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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Matrix subtotal returning wrong values (values are good ) but the Matrix subtotal is wrong .

Here the subtotals are wrong but the values are correct under the subtotal and when i add indivudlas in excel i got the exact value but the subtotals are wrong need help.

 

Target as of today =

VAR group1 =
CALCULATE(SUMX( 'Employee Table', 'Employee Table'[Target by Business day] ) * Date_Dim[_DayofYear], NOT( 'Employee Table'[EMPL_UNO] ) IN {2959,2960,2961,2962,2963,2964 })


VAR group2 =
CALCULATE (
SUMX( 'Employee Table', 'Employee Table'[Target by Business day] ) * Date_Dim[_DayofYearNew_2/27/2023],
'Employee Table','Employee Table'[EMPL_UNO] IN { 2960, 2961, 2962 }
)
VAR group3 =

CALCULATE( SUMX('Employee Table', 'Employee Table'[Target by Business day] ) * [_DayofYearNew 2/05/2023],
'Employee Table',( 'Employee Table'[EMPL_UNO] ) IN { 2959 })
VAR group4 =
CALCULATE (
SUMX('Employee Table', 'Employee Table'[Target by Business day] ) * Date_Dim[_DayofYearNew 3/27/2023],
'Employee Table','Employee Table'[EMPL_UNO] IN { 2963,2964 })
---
Return COALESCE(group1,group2,group3,group4)

 

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@Anonymous First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e

This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8



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...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.