Forum Discussion
Average
- 2 years ago
Can you compare the attached PBIX against your version?
The measure values in a matrix appear to match the summary table in your first post, where each individual date shows a sum, and those sums are averaged in the AVG column.
I made a slight adjustment in the attached PBIX to make use of a Date table, with some alternatives shown commented:
Average of Daily Sum of Duration = AVERAGEX ( VALUES ( 'Date'[Date] ), -- Alternatives: -- SUMMARIZE ( Data, 'Date'[Date] ), -- VALUES ( Data[DATE] ), CALCULATE ( SUM ( Data[DURATION] ) ) )Regards
Hi GRN_VPR8
It appears you want the average of the daily sum of duration.
Try something like this as a starting point:
Average of Daily Sum of Duration =
AVERAGEX (
VALUES ( Data[DATE] ),
CALCULATE ( SUM ( Data[DURATION] ) )
)
Using this measure in a Matrix like the example you posted, with STATION on Rows and DATE on Columns, the "Total" column would show the average of the daily totals. You can rename "Total" to "Average" in a Matrix visual as well if you like.
There may be some tweaking required depending how you would like to handle dates where the sum is blank. The above measure would exclude blanks from the average calculation.
Regards
Thanks for replying. I tried that, and all I got was an identical sum of duration for the day, not the average I was looking for.
- OwenAuger2 years agoSuper User
Can you compare the attached PBIX against your version?
The measure values in a matrix appear to match the summary table in your first post, where each individual date shows a sum, and those sums are averaged in the AVG column.
I made a slight adjustment in the attached PBIX to make use of a Date table, with some alternatives shown commented:
Average of Daily Sum of Duration = AVERAGEX ( VALUES ( 'Date'[Date] ), -- Alternatives: -- SUMMARIZE ( Data, 'Date'[Date] ), -- VALUES ( Data[DATE] ), CALCULATE ( SUM ( Data[DURATION] ) ) )Regards
- GRN_VPR82 years agoFrequent VisitorThank you for figuring it out!