7 Replies Latest reply on Nov 12, 2017 8:27 PM by Zhouyi Zhang

# Averages

Hi community,

this maybe a very simple operation but the level of average is quite confusing for me

Attached is the workbook of the sample superstore, filtered in view is 4 years of data showing \$2.2 mil

i would like to show the average, over the 4 year as 1 single value which is \$574k, however when i click on measure, then Average, it is showing \$230. how is that \$230 being calculated ? i need it to show as \$574K

same as if i were to filter to show monthly data in 2016, then the average should be divide by 12, and show 1 single value. However i am not seeing it.

what am i doing wrong ?

• ###### 1. Re: Averages

Hi, Gavin

I think the best way to do this is to use LOD calculation as screen shot below

ZZ

• ###### 2. Re: Averages

Hi zz,

What if its for months in a particular year…?

Gavin

• ###### 3. Re: Averages

Hi, Gavin

Then you need use month as partition

{Include datetrunc('month',[Order Date]): sum([Sales])}

ZZ

• ###### 4. Re: Averages

Hi again ZZ

If the granularity would be to divide by the number of records within the month, for all the months ie the average of all the sales within the month, how will that work out then

Thanks so much

Gavin

• ###### 5. Re: Averages

Hi, Gavin

when you say granularity, do you mean the number of days per month or you mean the average of each of the record?

ZZ

• ###### 6. Re: Averages

Hi ZZ

I meant the number of records per month, because not all months have the same number of records.

Gavin

• ###### 7. Re: Averages

Hi, Gavin

Then you need include month, day and order id in the calculation

ZZ