4 Replies Latest reply on Aug 27, 2018 10:00 AM by monse.garcia

# How to get the percent difference without selecting 2 years.

Hi guys,

Need some help, is there a way to get the percent difference without using table calculations? i need to show the % for the 2017, without selectiing 2 years (as i show in the image below)in the final view i will have a graph that shows only the values of the 2017, and if i select the year 2017 i want to have the % difference of that year, the same for each year.

i got this:

thank you so much.

I attached the workbook.

• ###### 1. Re: How to get the percent difference without selecting 2 years.

Someone might come up with a more clever solution, but IF you only ever need to show a 2-year comparison, then the easiest option would probably be creating a parameter for the years. If you do this, you could write an IF statement or write a calculation that said something like:

IF YEAR([DateField]) <= [ParameterYear] AND YEAR([DateField] ) - 2 >= [Parameter Year]

THEN 1

ELSE 0

END

Place this field on your filters shelf and keep True values. In your actual view, write a calculation that says INDEX() <> 1 and put it on your columns. Right-click and Hide the True value (should be the earliest year). You should now get % differences with or without table calculations. The trick is you are keeping 3 years in the view but hiding the first one at all times. The calculation is important, because statically hiding the first year would ALWAYS keep 2015/2016/20whatever hidden permanently, when you really want this to be dynamic.

1 of 1 people found this helpful
• ###### 2. Re: How to get the percent difference without selecting 2 years.

Hi Monse,

Is this you are expecting

Its only single calculation like below

LOOKUP(attr(year(Am Proc)),0) and use that as filter

Check the attached workbook for the same

Hope this helps

Plz mark this answer as correct or helpful so that it will help others

BR,

NB

2 of 2 people found this helpful
• ###### 3. Re: How to get the percent difference without selecting 2 years.

Naveen B

This is what I was looking for, thank you so much for your help, this will be really useful for the next dashboards.

Thanks!

• ###### 4. Re: How to get the percent difference without selecting 2 years.

Thank you so much for your help.!