5 Replies Latest reply on Apr 26, 2017 5:04 AM by Jim Dehner

# Comparing Benchmark Period Calculated Field with a Current Period Calculated Field

Hi,

I am trying to compare two calculated fields that are driven by date parameters, fuel economy from a "Baseline Period" against the fuel economy of a defined "Current Period"
I want the Baseline Period result to remain static whilst i am able to change the current period at will?

When i drop in the time period as week into the row shelf, i want to view the benchmark fuel result and calculate difference against current period??

I have attached packaged WB

Aaron

• ###### 1. Re: Comparing Benchmark Period Calculated Field with a Current Period Calculated Field

Hi Aaron

You have a lot of moving parts in your viz

For your benchmark calculation I suggest you try - it does result in a value (i.e. not nulls)

{ FIXED [Period Date Time]>[Benchmark Start], [Period Date Time]<[Benchmark End]: sum([Distance])/sum([Fuel Used] )}

I did not look at everything but I did see that your fuel economy calculations were not aggregated where most of your other calculations were aggregated - are you sure you want to do that?

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

• ###### 2. Re: Comparing Benchmark Period Calculated Field with a Current Period Calculated Field

Thanks for the reply Jim, although the calculation you provided doesn't work, getting a error message "Expected Comma or Colon in the Dimensionality Declaration" @ the ">"

I will take a look at the other calculations.

Regards

Aaron

• ###### 3. Re: Comparing Benchmark Period Calculated Field with a Current Period Calculated Field

see below - the third column is the calculation

• ###### 4. Re: Comparing Benchmark Period Calculated Field with a Current Period Calculated Field

Thanks again Jim, but still getting error, strange?

• ###### 5. Re: Comparing Benchmark Period Calculated Field with a Current Period Calculated Field

What version of tableau are you using?

Jim