0
votes

I have added a very simple example Tableau here: https://drive.google.com/file/d/1yG7EdIrKrTklhWOEoAmM4xwSbFZpOTvf/view?usp=sharing

In this example what I would like to achieve is to have a % change column which shows the % change.

I've tried using Quick table calculations but I cannot find any calculation that allows me to get the % change. I've also tried to use a calculated field with IF statements, but the calculation was returning blank cell.

P.S.

This is part of a more complex example in this thread: https://community.tableau.com/message/753038#753038

I have followed the answer in the link above and I was able to get to the point where I have the data showing up in two separate columns "Current Year" and "Prior Year".

But then I'm stuck on the supposedly easy step of simply calculating the % change between those two columns.

1
"I'm stuck" is not a problem description. What did you try? What went wrong?underscore_d
Hi, thanks for your answer. What I have tried is to use the Year of Year Growth Quick table calculation and it didn't work. ( I realise that my example should have Period dimension as type date - I will amend that.) I have also tried with a calculated filed with conditions like: SUM(IF period = 'a' THEN Test Value) - SUM(IF period = 'b' THEN Test Value) but again with no luck. I'll improve my example.Giacomo
Can you elaborate on what "with no luck" means? What happened? You got a blank result, or a 0, or a wrong number, or..?underscore_d
yes. One minute and I will update example and give more context. Thanks for your support.Giacomo
@underscore_d I've actually found out how to do this as I was working to improve the example. the solution is to add a table calculation. I'm sorry if I've created all this for nothing. Should I close this?Giacomo

1 Answers

1
votes

I was able to solve this issue by right clicking on the measure and selecting "Add Table Calculation".

Then I choose Calculation Type = "Percent Difference From", computing using = "Table (across)" and finally relative to = "Previous"