Need Help to Calculate +/- DI for the periods

Can any one help me to calculate the DI for periods?
I have attached one image for which Green Marked portion is clear; but red marked things are not clear, please help me to understand the red marked calculation.

I think you have missed this calculation EXCEL sheet.
Have a look.