Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon'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.
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! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
119 | |
83 | |
47 | |
42 | |
33 |
User | Count |
---|---|
190 | |
78 | |
72 | |
54 | |
45 |