2 Replies Latest reply on Aug 15, 2018 12:26 PM by David Maning

# How to subtract total from last month data by total of current month

Hi, I want to be able to take the running total from last month and subtract it by the running total of this month.

So for example: Up until last month, my sale was 200 total. At the end of this month, my total isales is 300. So i want to subtract 300-200, giving me 100, which is the sales that happened during the month.

Is this possible? Thank you

• ###### 1. Re: How to subtract total from last month data by total of current month

Hi John,

This should help

OR APPLY ---->  ZN(SUM([Sales])) - LOOKUP(ZN(SUM([Sales])), -1)

If you just want to get difference of Last 2 months and ignore the rest of the months then

APPLY   LOOKUP( ZN(SUM([Sales])) - LOOKUP(ZN(SUM([Sales])), -1),LAST())

Thanks,

Ritesh

Please mark the answer as CORRECT & helpful if it really helped you so that it can help others as well

• ###### 2. Re: How to subtract total from last month data by total of current month

Hi,

Calculation is simple:

RUNNING_SUM(SUM([Sales])) - LOOKUP(RUNNING_SUM(SUM([Sales])), -1)

Trust this helps.

D