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?
[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?