Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sunitha_chellaiah
Partner - Creator
Partner - Creator

Add current month and previous month data

Hi,

I want to add current month data with previous data in pivot table.

Please see the attached screenshot.

For month, I have taken monthnumber i.e. 1,2,3,etc.

I want output as , in monthnumber 2 , monthnumber 1 + monthnumber 2 values addition  should come.

For example: For Ahmedabad, in monthnumber 2 value should come as 250 (126+124).

Experssion used : sum(NOS)

sunitha_chellaiah_0-1621259184980.png

Kindly help me to solve this issue.

Thanks

 

3 Replies
mfchmielowski
Creator II
Creator II

Hi.

Do you want to add only one previous or every previous months?

Month2 =month1 +month2

Month3 =month1 +month2 +month3

Month4= month1 +month2 +month3+month4

Etc.? 

sunitha_chellaiah
Partner - Creator
Partner - Creator
Author

i want to add only one previous  month.

Month2 =month1 +month2

Month3 =month2 +month3

etc.

mfchmielowski
Creator II
Creator II

Hi

Try then expression: sum(NOS) + if(before(sum(NOS))>0,before(sum(NOS)),0)

mfchmielowski_0-1621331184142.png