1 Reply Latest reply on Sep 12, 2018 2:54 PM by Joe Oppelt

# Creating a Calculated field from the result of two calculated fields each having different relative dates

Hey Folks!!

Hope everyone's great and tableauing their way to glory.

I want to create a calculated field from the result of two calculate fields each having different relative dates. Both of these are present in different sheets as well.

So here's the playout:

Sheet one uses: Calculation 1 ( Running avg (sum(x))/Running avg (sum(y)) with dynamic date filter (Relative dates reflecting Q3 2018)

Sheet two uses: Calculation 2 ( Running avg (sum(x))/Running avg (sum(y)) with dynamic date filter (Relative dates reflecting Q3 2017)

What I'd love to display: Calculation 3: (Result of Calculation 1/ Result of Calculation 2) - 1   ---> YOY calculation

Any help would be great!

Thank you!

Best,

Raj

• ###### 1. Re: Creating a Calculated field from the result of two calculated fields each having different relative dates

You can't use table calcs from one sheet in another sheet.  Table calcs are calculated based on the table of the sheet where they are being used.

So you will need to calc those values all in the same sheet.  And that means you can't use standard filters on the sheet where you need both sets of values.  (If you filter out year-1, those rows aren't available for calculation3.)

So you need to find a way to specify what the user wants to see using parameters instead.  Bring in all the rows into the sheet, use params to control what the table calcs do, calc the calcs you need, and display what you need to display.  Table calc filters will leave all the rows intact in the underlying table, but control what part of the table to display on the sheet.

1 of 1 people found this helpful