Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Calculate Grand Total

Hello experts,

 

I would like to show the "Grand Total" of all these values on a pie chart 

LINE CHART.PNG

Here's the code for the line, the other one is the same but with 2022

LINE CHART 2.PNG

 

I created this measure : 

Mix CPNL 2021 = SUMX('BDD-MAJ 2021',[CPNL 2021])
 
But it don't work. What action or code should i use to display the grand total ?
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Please make sure where is month columns from in your line visual. 

Try measure as below.

Mix CPNL 2021 =
SUMX ( VALUES ( 'TableName'[Month] ), [CPNL 2021] )

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

 

Please make sure where is month columns from in your line visual. 

Try measure as below.

Mix CPNL 2021 =
SUMX ( VALUES ( 'TableName'[Month] ), [CPNL 2021] )

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@Anonymous This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Sorry i didn't understand what you said.

 

My line chart work perfectly but i want to add some bonus like the "grand total" 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.