Do not return NaNs if a variable is 0 in all periods.

parent 283c2614
Pipeline #3569 passed with stage
in 1 minute and 26 seconds