I have a longitudinal data set of total sales ($ amounts). I have created an inflation adjustment index variable (float). There is one index value for each sales value per year. I would like to create a "Adjust for Inflation?" filter that would tell tableau to apply the following formula (total sales * inflation adjustment) if the user selects "yes" in the filter. Then all of the total sales data points would shift to the inflation adjusted amounts in the workbook. If the user selects "no" in the filter then the values would stay in their nominal form. Can anyone provide guidance on how to accomplish this?
Can you create a parameter "Adjusted for Inflation?" with values 'Yes' and 'No' and then measure like this:
IF [Adjusted for Inflation?] = 'Yes' THEN [Sales] * (1 + [Inflation rate]) ELSE [Sales] END