Thanks for the answer but my requirement is to implement this scenario in aggregation.
In below screen shot at the 3rd row, there are two values for file_size. so the display in calculation1 (copy) should be
sum of two values which is (24MB + 447.5MB) 471.5MB.
Note: I have tableau 9.0 version. If possible attach the twbx file with this version.
Can you please attach the sample file so that I can help you with the conversion? Try removing File size, calculation7 and calculation 5 column. It will automatically aggregate the things for you. For a modification date (3rd row), you will get sum of (24MB + 447.5MB) 471.5MB.
Sorry I had no idea you have lower version of tableau. Please find the below calculation field which I have created. This formula will work in aggregation scenario's as well.
IF LEN([Value])=3 then [Value]+" KB"
ELSEIF LEN([Value])>3 and LEN([Value])<=4 then STR(INT([Value])/1024) +" MB"