Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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,
Solved! Go to Solution.
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
Hello @Mariusz ,
Thank for your comment and DAX sentence. I got grand total for all countries even those countries has no data. Is it possible to show the countries if sum of amount is not zero.
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
75 | |
56 | |
38 | |
34 |
User | Count |
---|---|
99 | |
56 | |
51 | |
44 | |
40 |