7 Replies Latest reply on Oct 4, 2018 6:03 AM by Diana Prado

# How do I get % difference from "difference"?

Hello,

First I just want to thank you for your help in advance! Please see the attached packaged workbook using superstore data. I want to make the column labeled "Difference between 12 month average vs current month" be a % difference rather than just the difference. I have a feeling this is probably very simple but I can't figure out how to do it.

Thank you!

• ###### 1. Re: How do I get % difference from "difference"?

Hi Diana.

Difference between 12 month average vs current month:

(SUM([Sales])-WINDOW_AVG(SUM([Sales]), -11, 0))/WINDOW_AVG(SUM([Sales]), -11, 0)

You will get the required O/P

Hope this helps

BR,

NB

1 of 1 people found this helpful
• ###### 2. Re: How do I get % difference from "difference"?

Hello Diana,

You can try below approach:

1. 12 month average  = WINDOW_AVG(SUM([Sales]), -11, 0)

2. % Difference = (SUM([Sales])- [12 month average ]) /[12 month average ]

Change the data type to % .

1 of 1 people found this helpful
• ###### 3. Re: How do I get % difference from "difference"?

Thank you so much!!

Diana

• ###### 4. Re: How do I get % difference from "difference"?

Hello again Meenu,

I have a follow-up question. Now I am trying to do this with an AGG (Profit Ratio) but it is acting up for me. Please find the workbook attached again where you can see my attempt.

Here is a screenshot where you can easily see that the % Diff. Profit Ratio numbers are incorrect:

Thank you again for your help!

• ###### 5. Re: How do I get % difference from "difference"?

Hello again Naveen,

I have a follow-up question. Now I am trying to do this with an AGG (Profit Ratio) but it is acting up for me. Please find the workbook attached again where you can see my attempt.

Here is a screenshot where you can easily see that the % Diff. Profit Ratio numbers are incorrect:

Thank you again for your help!

• ###### 6. Re: How do I get % difference from "difference"?

Hi Diana,

Check the below screenshot

Hope this helps

BR,

NB

1 of 1 people found this helpful
• ###### 7. Re: How do I get % difference from "difference"?

Thank you so much, Naveen!!