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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

I need to Sum up a measure

I have a measure I created to get me a single value for each date. The code below allows me to take a value once since there are usually 3 records with the same MtdActual(this is because there are 3 shifts). 

 

My issue comes in the matrix visual that I am using this measure in. It works great for the subtotal of each product but the grand total is not calculated correctly  (Shown in the image at the bottom)

 

What I need to do now is get a sum of the measure but IM not sure how to do it

 

Heres My Measure that I would Like to Sum:

MaxMTDMaterialUnits =
MAXX(
KEEPFILTERS(VALUES(V_PBI_Daily_Attainment[Date])),
CALCULATE((MAX(V_PBI_Daily_Attainment[MtdActual]))))
 
 
As you see below my Grand total for the MTD Units is incorrect, but all my subtotals are good.
Plan vs Actual.jpg
 
 

 

 

 
2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

You can refer the content in the following links to deal with the incorrect total values problem.

Obtaining accurate totals in DAX

DAX – Subtotals and Grand Totals That Add Up “Correctly”

Dax for Power BI: Fixing Incorrect Measure Totals

Why Your Total Is Incorrect In Power BI - The Key DAX Concept To Understand

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PaulDBrown
Community Champion
Community Champion

@Anonymous 

 

Try: 

Totals for MaxMTDMaterialUnits = 
SUMX( table [Material], [MaxMTDMaterialUnits])




Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.