Forum Discussion
mcmullenrich
4 years agoFrequent Visitor
Average $ per weekday
I have a table of cash receipts with a date column (i.e., 1/1/2022...4/4/2022). I'd like to calculate the average amount received by week day. So if there were 3 Mondays in the date range and the tot...
- 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] ) ) ) )
tamerj1
Community Champion
4 years agoHi mcmullenrich
you can create a new calculated column for weekday
FORMAT ( WEEKDAY(Table[Date]), "dddd" )
then use it in your visual with simple AVERAGE Measure
- mcmullenrich4 years agoFrequent Visitor
Thanks tamerj1. I tried this and got the average of all the individual transaction instead of the average daily total for each day.
- tamerj14 years ago
Community Champion
Hi mcmullenrich
Try
DIVIDE (SUM (Table[Value]), CALCULATE (SUM(Table[Value]), ALLSELECTED(Table[Weekday])))
- mcmullenrich4 years agoFrequent Visitor
Hmm...that got me a 1 for each day. I think I'm using the wrong Table[Value] on one of them:
Average per Weekday :=
DIVIDE (
SUM ( Combined[Amount] ),
CALCULATE ( SUM ( Combined[Amount] ), ALLSELECTED ( 'Calendar'[Day Of Week] ) ),
0
)