Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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
)
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
9 | |
8 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
10 | |
9 |