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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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

v-junyant-msft
Community Support
Community Support

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
v-junyant-msft
Community Support
Community Support

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
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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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