Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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.
The desired output with correct row total:
Solved! Go to Solution.
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
 
 Proud to be a Super User!  |   | 
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.
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.
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
 
 Proud to be a Super User!  |   | 
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.