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.
Sumx on Measures not working for me
I need a quick dax help here.
Sales | ||||||||
Item | Col1 | Col2 | col2 | Col4 | Col3 | DIFF | ||
A | 10 | 3 | 12 | 30 | 36 | -6 | ||
B | 20 | 6 | 14 | 120 | 84 | 36 | ||
C | 25 | 4 | 2 | 100 | 8 | 92 | ||
D | 10 | 6 | 14 | 60 | 84 | -24 | ||
E | 17 | 4 | 2 | 68 | 8 | 60 | ||
On Sales table.
Assume that Col 3 and col 4 are derived and formular is unknown.
The Ask is to determine Total Price Decline (Diff) = Col4 – Col3,
Filtered to only customers having Diff value of less than 0
My issue is that I am not failiar with using Sumx on measures.
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Diff measure: =
VAR _newtable =
FILTER (
ADDCOLUMNS (
VALUES ( Sales[Item] ),
"@diff", [Col4 measure:] - [Col3 measure:]
),
[@diff] < 0
)
RETURN
IF ( HASONEVALUE ( Sales[Item] ), SUMX ( _newtable, [@diff] ) )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi @Anonymous ,
Whether the advice given by @Jihwan_Kim has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.
Looking forward to your feedback.
Best Regards,
Henry
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Diff measure: =
VAR _newtable =
FILTER (
ADDCOLUMNS (
VALUES ( Sales[Item] ),
"@diff", [Col4 measure:] - [Col3 measure:]
),
[@diff] < 0
)
RETURN
IF ( HASONEVALUE ( Sales[Item] ), SUMX ( _newtable, [@diff] ) )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
147 | |
85 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |