Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Dear Members,
got stucked with what seems to be an easy ride, but apparently is above my skillset and somehow wasn't able to find out correct answer.
Case:
Have both LBE and AOP. Not all managers provided LBE numbers so when LBE is empty I want Power BI to take AOP figures - simple as that. As per below formulas that's how I'm calculating both - results can be seen on attached screenshot:
Solved! Go to Solution.
Hi all,
I have sorted out the case by myself by wraping the entire calculation into another measure with SUMX & SUMMARIZE function which eventually picks the total row in correct manner.
In other words:
Hi all,
I have sorted out the case by myself by wraping the entire calculation into another measure with SUMX & SUMMARIZE function which eventually picks the total row in correct manner.
In other words:
Hi, @ponczula
The measure correctly calculates individual rows because it evaluates the condition of each row. However, for the total row, Power BI attempts to aggregate the results of the measure directly, rather than re-evaluating the criteria for the aggregated values. This often leads to unexpected results when using conditional logic in measures.
You might be able to try the following DAX:
LBE final =
SUMX(
VALUES('DB'[SomeUniqueIdentifier]),
IF(
ISBLANK(CALCULATE(SUM('DB'[USD]), 'DB'[Scenario] = "LBE")),
CALCULATE(SUM('DB'[USD]), 'DB'[Scenario] = "AOP"),
CALCULATE(SUM('DB'[USD]), 'DB'[Scenario] = "LBE")
)
) / 1000
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I tried replicating your issue but it works for me (see screenshot). However, I did not replicate your first column, I just entered the figures by hand. Perhaps you have a weird filtering or formatting in there.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.