Please always do show us your efforts, as we all are here to learn and help each other.
Could you please try following and let me know if this helps you.
@RavinderSingh13: seeing the long way you go to account for the units and their respective weight factors, I don't understand why you obviously don't count a value with absent units for "bytes" and a weight of 1E-9 (or 2^-30 for binary values)?