8 Replies Latest reply: Aug 25, 2016 6:40 AM by Sunny Talwar

# Need to calculate Perc diff this month last month

Hi All

i have a requirement to show data like below

where i am calculating % diff of current month and same month last year for all the months and also calculating % diff of current three months and same three months last year

Can any one help me or suggest something

 Year Month ABC Increase on same month Increase on same quarter in previous Year 2016 Aug 10 =(10-40)/40 2016 Jul 20 2016 Jun 30 2016 May 40 2016 Apr 50 2016 Mar 60 2016 Feb 70 2016 Jan 80 2015 Dec 90 2015 Nov 10 2015 Oct 20 2015 Sep 30 2015 Aug 40 2015 Jul 50 2015 Jun 60 2015 May 80 2015 Apr 10 2015 Mar 30 2015 Feb 10 2015 Jan 30 2014 Dec 50 2014 Nov 60 2014 Oct 10 2014 Sep 50 2014 Aug 30 2014 Jul 40 2014 Jun 30 2014 May 50 2014 Apr 60 2014 Mar 20 2014 Feb 30 2014 Jan 50

Thanks

Kushal

• ###### Re: Need to calculate Perc diff this month last month

There is two way to do this, I recommend the first way

1) Use The As-Of Table

2) Use Above()/Below() function

(Sum(ABC) - Below(Sum(ABC), 12)) / Below(Sum(ABC), 12)

• ###### Re: Need to calculate Perc diff this month last month

Hi Sunny

Below function is not working as i am deriving ABC values using count function and it is not working with below function

Regards

Kushal

• ###### Re: Need to calculate Perc diff this month last month

Do you have multiple dimensions? May be you need a TOTAL. The reason I say that is because I don't think Count should cause any issues.

(Count(ABC) - Below(TOTAL Count(ABC), 12)) / Below(TOTAL Count(ABC), 12)

If this doesn't work, would you be able to share the expression you are using?

• ###### Re: Need to calculate Perc diff this month last month

it is giving null because year is changing if i use 12 from 2016 to 2015

• ###### Re: Need to calculate Perc diff this month last month

The one where we added TOTAL is the one which is giving null?

• ###### Re: Need to calculate Perc diff this month last month

Attaching a sample

• ###### Re: Need to calculate Perc diff this month last month

Thanks Sunny its working

Can you also helo how we can do for last 3 months againt those 3 months in last year

Regards

Kushal

• ###### Re: Need to calculate Perc diff this month last month

Like you had an example for the increase on the same month, can you also provide an example for this quarter change you are looking for? I think it will be easier for me to understand what you want if there is an example to look at