2 Replies Latest reply on Jan 25, 2019 11:55 AM by Deepak Rai

# Percent of Average Table Calculation Help

Hi Guys,

I am having trouble creating a percent of average table calculation. I have 6 years worth of data (2013-2019) broken down into weekly figures for each year. I also have a annual average using a grand total column table calculation. The values are aggregates of measures as well. I am using sensitive data so I can only include a screenshot of what I'm working with:

Circled are the annual averages and highlighted are the columns that represent a specific week of the year, with the corresponding average value for that week in the columns. What I would like to do is calculate what the percentage of any given week is relative to the annual average. For example, week 0101 during 2013 averages 3,058. The total average for 2013 is 3,452. I want to calculate 3,058/3,452 (week value over annual value). In this case the result would show that week 0101 of 2013 was 89% of the annual average.

I can do this easily in excel, but would love to know how to set this up in tableau.

Thanks!

• ###### 1. Re: Percent of Average Table Calculation Help

Hi

see the attach superstore example

Grand totals can't be used in a calculation but you can do this

use an lod to determine the yearly avg

then use that to determine the percentage

it returns this

You mentioned the values in your avg were calculated - if so you may need to make them lods also then then nest that LOD in the calculations above

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: Percent of Average Table Calculation Help

Here it is:

I used Superstore Data.

If it Helps, Pl Mark it Helpful and CORRECT to Close Thread

Thanks

Deepak