6 Replies Latest reply on Oct 18, 2018 7:48 AM by tadd.wagner

# Creating a baseline

Hi,

I am new to tableau and struggling with calculations.

I need to create a baseline. Our baseline is the average cost per stop in 2017. This baseline is not rolling and should not change based on current date.

My formula is below: The problem with this is the formula is taking the total route expenses for 2017 / the total stops for 2017. Instead,  I need it to sum the individual cost per stop for each month in 2017 and then divide by 12 to tell me the average.

If ATTR([Months in Prior Year Pt 1] = TRUE) then [USHC Route Expense Per Stop w/o Fuel charge] else 0 END

Any help would be greatly appreciated!

• ###### 1. Re: Creating a baseline

Hi Grace. Can you please attach a sample workbook?

• ###### 2. Re: Creating a baseline

Unfortunately, my company does not allow me to share the data.

• ###### 3. Re: Creating a baseline

Grace, I am in the same boat as you. However, you can use the Superstore data for a quick example. Anonymize your Tableau Package Data for Sharing

• ###### 4. Re: Creating a baseline

I may be able to ask this in a different way without using a workbook.

I can filter my data by date to only show last year and then pull in the measure cost per stop to the marks card to see it for every month. Then I can use the Analysis field to show row grand totals. When I change grand totals to "total all using" and then select average, I get my desired outcome.

The problem is I can't show that number as a measure to display in different views.

Is there a way for me to view the formula behind the grand totals so I can create the calculation in measures?

• ###### 5. Re: Creating a baseline

Have you tried something like this? But using your measure instead of "Sales"...

• ###### 6. Re: Creating a baseline

Hi Grace,

Did you ever figure this out?