Forum Discussion
yukon
Helper I
6 years agoHow to show Grand Total as Column
Hello everyone,
I'm trying show the grand total as column as below screenshot. I write some Dax, however it's given sub total of each values instead of Grand Total. Is it any others way to get same outcome with DAX?
Please find the attached for your refrences. Sample Excel File
Regards,
- Anonymous6 years ago
HI yukon,
Perhaps you can add a values filter on Dax formula, then it will group the calculation based on current row label category:
Measure version: Measure = CALCULATE ( SUM ( 'Table'[Amount(EUR)] ), ALLSELECTED ( Table ), VALUES ( Table[Country] ) )If you want to use calculate column, please check below formula:
Calculate column version: Grand Total = CALCULATE ( SUM ( 'Table'[Amount(EUR)] ), FILTER ( ALLSELECTED ( Table ), Table[Country] = EARLIER ( Table[Country] ) ) )Regards,
Xiaoxin Sheng
3 Replies
- Mariusz
Community Champion
- AnonymousNot applicable
HI yukon,
Perhaps you can add a values filter on Dax formula, then it will group the calculation based on current row label category:
Measure version: Measure = CALCULATE ( SUM ( 'Table'[Amount(EUR)] ), ALLSELECTED ( Table ), VALUES ( Table[Country] ) )If you want to use calculate column, please check below formula:
Calculate column version: Grand Total = CALCULATE ( SUM ( 'Table'[Amount(EUR)] ), FILTER ( ALLSELECTED ( Table ), Table[Country] = EARLIER ( Table[Country] ) ) )Regards,
Xiaoxin Sheng