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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
TracyTran
Helper I
Helper I

Row total does not correct with Matrix

Hi friends, 

 

I faced challenges in determining the total sales from new customers within a user-selected time period.

 

 

New_customers_Sales = 
VAR CurrentMonth = SELECTEDVALUE('D_Date'[End of Month])
var result = 
CALCULATETABLE(
    VALUES(F_Order[customerid]),
    F_Order[First Order Date (EOM)] = CurrentMonth
)
return 
SUMX(result, CALCULATE([sale_Amount]))

 

 

I encountered an issue with the Matrix visual where the row total does not display accurately.

 

wrongSale.png

 The desired output with correct row total: 

 

Correct.png

2 ACCEPTED SOLUTIONS
PijushRoy
Super User
Super User

Hi @TracyTran 

Please check this video why Matrix total is not matching
https://www.youtube.com/watch?v=6rgAkejrup8

If solved your requirement, please mark this answer as SOLUTION.

Thanks
Pijush




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





View solution in original post

Anonymous
Not applicable

Hi @TracyTran ,

The problem you are facing may be due to the context in which the totals are calculated.Power BI calculates totals based on the context of the entire table, which may not always match the expected results when using complex metric values that involve filters or specific row contexts.
DAX overview - DAX | Microsoft Learn
To solve this problem, you can try using the "HASONEVALUE" function to modify the behavior of the metric when calculating the total.
HASONEVALUE function (DAX) - DAX | Microsoft Learn
Please provide some sample data so I can try to modify DAX for you.

Best Regards,
Dino Tao
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

2 REPLIES 2
Anonymous
Not applicable

Hi @TracyTran ,

The problem you are facing may be due to the context in which the totals are calculated.Power BI calculates totals based on the context of the entire table, which may not always match the expected results when using complex metric values that involve filters or specific row contexts.
DAX overview - DAX | Microsoft Learn
To solve this problem, you can try using the "HASONEVALUE" function to modify the behavior of the metric when calculating the total.
HASONEVALUE function (DAX) - DAX | Microsoft Learn
Please provide some sample data so I can try to modify DAX for you.

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

PijushRoy
Super User
Super User

Hi @TracyTran 

Please check this video why Matrix total is not matching
https://www.youtube.com/watch?v=6rgAkejrup8

If solved your requirement, please mark this answer as SOLUTION.

Thanks
Pijush




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.