why there is deviation in original duration if "Hide if empty" is unchecked ?

Member for

21 years

This relates to the way durations are calcuated in summary bars, in particular which calendar to use to "back-calculate" the durations from the dates in the summary (which is how those durations are calculated)

If all of the activities within a single Group-and-Sort band share the same calendar, that calendar will be used to calculate the summary bar durations, other wise the so-called "Default" calendar will be used. 

By using "hide if empty" the number of Group-and-Sort bands will vary, and therefore the summary-duration rules will change.

The above is true from version 6.7 onwards.