Averaging Measures

JeffCat

New Member
Joined
Aug 6, 2013
Messages
3
I am fairly new to PowerPivot and DAX so I am probably missing something fairly obvious. I working to get a daily average of units completed in PowerPivot excluding days where the units produced is abnormally low (say <10), or days where none were produced at all. The source date is something like:

[TABLE="width: 226"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Category[/TD]
[TD]Qty[/TD]
[/TR]
[TR]
[TD="align: right"]8/1/2013[/TD]
[TD]CategoryA[/TD]
[TD="align: right"]400[/TD]
[/TR]
[TR]
[TD="align: right"]8/1/2013[/TD]
[TD]CategoryA[/TD]
[TD="align: right"]20[/TD]
[/TR]
[TR]
[TD="align: right"]8/1/2013[/TD]
[TD]CategoryB[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD="align: right"]8/1/2013[/TD]
[TD]CategoryC[/TD]
[TD="align: right"]50[/TD]
[/TR]
[TR]
[TD="align: right"]8/2/2013[/TD]
[TD]CategoryA[/TD]
[TD="align: right"]400[/TD]
[/TR]
[TR]
[TD="align: right"]8/2/2013[/TD]
[TD]CategoryA[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD="align: right"]8/2/2013[/TD]
[TD]CategoryB[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD="align: right"]8/2/2013[/TD]
[TD]CategoryC[/TD]
[TD="align: right"]50[/TD]
[/TR]
</tbody>[/TABLE]


I have a measure [DailyTotals] that shows the daily totals when the condition is met (>10). The PowerPivot looks like:

[TABLE="width: 292"]
<tbody>[TR]
[TD]Category[/TD]
[TD]Date[/TD]
[TD]DailyTotals[/TD]
[/TR]
[TR]
[TD]CategoryA[/TD]
[TD="align: right"]8/1/2013[/TD]
[TD="align: right"]420[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]8/2/2013[/TD]
[TD="align: right"]500[/TD]
[/TR]
[TR]
[TD]CategoryB[/TD]
[TD="align: right"]8/2/2013[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD]CategoryC[/TD]
[TD="align: right"]8/1/2013[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]8/2/2013[/TD]
[TD="align: right"]50[/TD]
[/TR]
</tbody>[/TABLE]

How can I get an average of my measure (IE if I collapse Category column CategoryA average = 460, CategoryB average = 200, CategoryC average = 125)? I have tried =Average([DailyTotals]) and =[Average of DailyTotals] and get errors. Any suggestions?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
OK so I solved it with =AVERAGEX(VALUES(Table1[Date]),[DailyTotals])

Hope this helps someone else :)
 
Upvote 0

Forum statistics

Threads
1,223,956
Messages
6,175,611
Members
452,660
Latest member
Zatman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top