4 Replies Latest reply on Jan 5, 2017 1:31 AM by Norbert Maijoor

# how to find difference betwwen two months

hi everyone,

In my project I need to find the difference or sum of two continue months. For the difference I used the formula as

ZN(SUM([Sales Forecast])) - LOOKUP(ZN(SUM([Sales Forecast])), -1)

And now the requirement for February month  need to print the result as "((January - December )+( February-January))" ,

For march month is   "((January - December )+( February-January)+(March-February)))" ,.... up to December.

Please any one help for solve these problem.

Thanks,

Vidya

• ###### 1. Re: how to find difference betwwen two months

Use your calculated field in running total, over months

• ###### 2. Re: how to find difference betwwen two months

HI Vidya,

What I understand is that you can use "Quick Table Calculation > Difference for your first requirement.

For your second requirement find my approach below as reference and stored in attached workbook version 10.1

a. Sales per month

December:  if [Order Date (Months)]=#1-12-2014# then [Sales] END

January: if [Order Date (Months)]=#1-1-2015# then [Sales] END

February: if [Order Date (Months)]=#1-2-2015# then [Sales] END

etc

b. January - December: sum([January])+sum([December])

c. February - January: sum([January])+sum([Februari])

d. February month: [January - December]+[February - January]

etc

• ###### 3. Re: how to find difference betwwen two months

HI Nobert,

Thank for the solution am getting the solution for part a. Here for part B calculation the result is not displaying.  Can you help me to solve the [roblem

a) December:  if [Order Date (Months)]=#1-12-2014# then [Sales] END

January: if [Order Date (Months)]=#1-1-2015# then [Sales] END

February: if [Order Date (Months)]=#1-2-2015# then [Sales] END

etc

Thanks,

Vidya

• ###### 4. Re: how to find difference betwwen two months

Hi Vidya,