The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
)
)
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
21 | |
18 | |
16 | |
15 | |
14 |
User | Count |
---|---|
37 | |
33 | |
22 | |
18 | |
17 |