1 2 Previous Next 17 Replies Latest reply on Dec 5, 2017 1:33 AM by Simon Runc

# % increase and % decrease

Can anyone tell me is there any formula for calculating % increase and % decrease ?

• ###### 1. Re: % increase and % decrease

Hi,

Have you tried using the % difference table calculation?

• ###### 2. Re: % increase and % decrease

Attach a sample .twbx

-AV.

• ###### 3. Re: % increase and % decrease

There is...

Current Period/Previous Period - 1

OR

(Current Period - Previous Period)/Previous Period

which are the same (people have personal preference on which version they like!)

How you implement this in Tableau depends on what you are trying to compare, the data and at what level. I'll need a bit more detail (ideally an example workbook) to give you an exact answer.

1 of 1 people found this helpful
• ###### 4. Re: % increase and % decrease

Yes i tried not working

• ###### 5. Re: % increase and % decrease

Yes i tried. Not working.

• ###### 6. Re: % increase and % decrease

If you could post a sample workbook or even a full screenshot would help

• ###### 7. Re: % increase and % decrease

Hi Neil,

I already sent the screenshot sometime back to . Can you check it and

revert.

Regards,

Venkat.K

On Fri, Dec 1, 2017 at 7:39 PM, Neil Lord <tableaucommunity@tableau.com>

• ###### 8. Re: % increase and % decrease

Can you re-post the screen shot...as the only one I can see in this thread is the one Neil posted. You can do %age Difference in different ways in Tableau (either using the method of having the "things to compare" in the viz, and using a Table Calc as Neil has shown, or if you have 2 measures [say Sales TY and Sales LY] you can do the calculation as per my post, so we really need more information to answer the question)

• ###### 9. Re: % increase and % decrease

Sure. The question is :

For films where Disney was not the lead studio, what was the % decrease in profitability from 2010 to 2011?

Attached is the dataset and the screenshot of the workbook I tried.

• ###### 10. Re: % increase and % decrease

Thanks for that.

So one way is as Neil showed using the "Quick Table Calc" and selecting Percent Difference

I've brought year into the Viz (and set a filter to pick up the last 2 years)...and so the table calculation can work out the %age difference between these 2 years.

Hope this helps

• ###### 11. Re: % increase and % decrease

Thanks a lot. I got the right answer. But I have one query.

Now that you gave answer how to calculate % decrease by going to  "Quick Table Calculation" - > "Percentage Difference" and got the % decrease. But how to calculate % increase for the same question ?

• ###### 12. Re: % increase and % decrease

Well actually that formula does the %age difference, so both increase and decrease. However we can split the formula into 2 so we get a field for increases and one for decreases.

The Quick Table calculation is just table writing a table calculation, for the most common uses (%age difference, % of Total...etc.), but by dragging the field into the measures it will create the formula to be reused

and then we can use this to create an increase version and a decrease version;

[%age Increase]

IF [Difference] >=0 THEN [Difference] END

and

[%age Decrease]

IF [Difference] <0 THEN [Difference] END

and then we can use these new fields seperatley

• ###### 13. Re: % increase and % decrease

Thanks. I replicated what you showed in the gif file. I understood.

• ###### 14. Re: % increase and % decrease

So as per your advice, "Percentage difference" option in "Quick Table Calculation" is to calculate % total, % difference etc.. Can this option will work out for the below question or do I need to create any LOD kind of stuff to solve this question ?

{FIXED [Order ID] : COUNTD([Customer Name]) }

How many customers have purchased in consecutive 2 yrs and also ordered in current year ?

Attached is the workbook screenshot which I did. Is my approach right ? It will be great if you provide suggestions on this regards.

1 2 Previous Next