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.
case
when (COALESCE(sum(ABC),0) - COALESCE(sum(ABCD),0)) < 0 then 0
else (COALESCE(sum(ABC),0) - COALESCE(sum(ABCD),0)) / sum(XYZ)
Solved! Go to Solution.
can you please show me the full measure how you wrote it
or please try
Measure =
VAR result = SUM('Table'[ABC]) - SUM('Table'[ABCD])
RETURN
IF(
result < 0,
0,
DIVIDE(
result,
SUM('Table'[XYZ]),
0
)
)
hello please try
IF(
CALCULATE(SUM('Table'[ABC])) - CALCULATE(SUM('Table'[ABCD])) < 0,
0,
DIVIDE(
CALCULATE(SUM('Table'[ABC])) - CALCULATE(SUM('Table'[ABCD])),
SUM('Table'[XYZ])
)
)
Thank you for the reply. Somehow the last bit which is
SUM('Table'[XYZ])
is actually a measure and DAX is not picking up with this syntax and also coming with this error
so incase if you can help me further thank you
can you please show me the full measure how you wrote it
or please try
Measure =
VAR result = SUM('Table'[ABC]) - SUM('Table'[ABCD])
RETURN
IF(
result < 0,
0,
DIVIDE(
result,
SUM('Table'[XYZ]),
0
)
)
User | Count |
---|---|
20 | |
14 | |
11 | |
8 | |
6 |
User | Count |
---|---|
23 | |
23 | |
20 | |
15 | |
10 |