Forum Discussion
Average $ per weekday
- 4 years ago
Hi mcmullenrich
Sorry for the late reply. Here is the workable solution as per sample sampleAverage of Amt := DIVIDE ( SUM ( Combined[Amount] ), COUNTROWS ( FILTER ( 'Calendar', NOT ISBLANK ( Combined[Sum of Amt] ) ) ) )
Then I hope the last solution works.
Not quite there yet. I realized the issue, just not sure how to solve in DAX. My excel-based approach above only works if I have a single entry for each date (i.e., a daily deposit amount). However, in my PBI table, I have multiple transactions for each date. As such, your approach gives me much smaller numbers than it should be. I need to find a way to sum by date before adding and counting.
- tamerj14 years agoCommunity Champion
Hi mcmullenrich
Sorry for the late reply. Here is the workable solution as per sample sampleAverage of Amt := DIVIDE ( SUM ( Combined[Amount] ), COUNTROWS ( FILTER ( 'Calendar', NOT ISBLANK ( Combined[Sum of Amt] ) ) ) ) - tamerj14 years agoCommunity Champion
mcmullenrich
Even though, COUNTROWS ( 'Calendar' ) should give the frequency count of the selected weekday as the date table has no duplicates. Can you please share some screenshots of you tabels, data model, report and the measure? - mcmullenrich4 years agoFrequent Visitor
This feels a bit like I cheated, but it did get me the result that I wanted:
Average per Weekday :=
DIVIDE ( [Sum of Amt], MAX ( Combined[WeekNo] ) - MIN ( Combined[WeekNo] ) + 1 )