Forum Discussion
RodoFliess
Feb 17, 2023Copper Contributor
Data Model Pivot Table Average Subtotals
Hello Everyone, I´m having an issue witha a pivot table from the data model. I want the quarterly subtotals to show monthly average rather than sum, but the option is grayed out: Is there...
- Feb 18, 2023
For such sample
measure could be
Total:=IF ( HASONEVALUE ( tbl[Date (Month)] ), SUM ( tbl[Value] ), AVERAGEX ( VALUES ( tbl[Date (Month)] ), DIVIDE ( SUM ( tbl[Value] ), COUNTROWS ( VALUES ( tbl[Date (Month)] ) ), 0 ) ) )
RodoFliess
Feb 17, 2023Copper Contributor
SergeiBaklan
Thanks for your reply!
I´m not very good with DAX measures, how could I create a measure that sums by month and then shows quarter monthly average?
Thanks!
SergeiBaklan
Feb 18, 2023Diamond Contributor
For such sample
measure could be
Total:=IF (
HASONEVALUE ( tbl[Date (Month)] ),
SUM ( tbl[Value] ),
AVERAGEX (
VALUES ( tbl[Date (Month)] ),
DIVIDE ( SUM ( tbl[Value] ), COUNTROWS ( VALUES ( tbl[Date (Month)] ) ), 0 )
)
)
- RodoFliessFeb 22, 2023Copper ContributorThank you so much! This is exactly what I needed!
- SergeiBaklanMar 01, 2023Diamond Contributor
You are welcome, glad to help