5 Replies Latest reply on Nov 15, 2017 7:01 PM by Si Hui Tang

# Tableau Avg

Hi all,

I have 10 stores and each store has sales of \$2000 per month.

I have 4 months.

I would like to obtain a monthly sales average. However, in tableau, when I choose the avg function, it averages based on per store. Can I know what calculation is needed to derive a monthly average instead of a store average?

Thanks!

• ###### 1. Re: Tableau Avg

Hi, Si Hui

Try this:

{Fixed [Month]:AVG({Fixed [Store], [Month]:sum([Sales])})}

ZZ

1 of 1 people found this helpful
• ###### 2. Re: Tableau Avg

Hi Zhouyi,

Now there are 7 months and fuel used in total is 100,000. Would the same formula apply to this scenario? I would like to obtain a monthly average of fuel usage.

• ###### 3. Re: Tableau Avg

Hi, Si Hui

I guess you need add flights as well

{Fixed [Month]:AVG({Fixed [aircraft types], [Month],[flights]:sum([fuel used])})}

ZZ

1 of 1 people found this helpful
• ###### 4. Re: Tableau Avg

Hi Zhouyi,

AVG({Fixed[Month]:sum([Burn-off for DF only (dwt)])})

This formula gives me the correct number but is not dynamic according to Aircraft types. I have 3 different aircraft types and when I filter, the numbers stay the same.

• ###### 5. Re: Tableau Avg

Hi Zhouyi,

I realize this eqn does the job. sum([Burn-off for DF only (dwt)])/COUNTD([Month])

Thank you so much for your help!