1 Reply Latest reply on Nov 28, 2018 8:39 PM by swaroop.gantela

# Change from a reference date

Hi all,

I am trying to build a map which will give a % of product sold in an area. For that reason I have a calculation in place. I would like to have also the difference in that % vs a reference month. I have seen in this Table Calculations for Advanced Analysis in Tableau that this is possible to do it. When following the instructions I manage to create the calculation for the % on reference date. However, every time I change the reference date I see that calculation moving to the month specified on reference date. Hence the difference I see is always 0 because the % of sales in that month equals the % of the sales in the reference date. Do you know how to fix this? For example I would like to see what was the difference on June vs January the same year.

Thanks,

Emmanouil

• ###### 1. Re: Change from a reference date

Emmanouil,

I have the impression that you can achieve your goal with a Level of Detail calculation:

Overview: Level of Detail Expressions - Tableau

I attempted this in the demonstration workbook.

The idea is:

- get the monthly sales,

- get the sales for the reference month

- fix that reference value to every other month

Monthly Sales:

Reference Sales:

{ FIXED [Ticker]:MIN(

IF [Date (Months)]=[Date (Months) Parameter]

THEN [Monthly Sales]

END)}

Percent diff from ref: