Forum Discussion
Gigi2909
3 years agoFrequent Visitor
Power BI Total Incorrect
Hi, I created a measure if actual isblank, then use LBE. but the total is incorrect. LBEorACT = if (ISBLANK(sum(table1[Actual])),sum(table2[LBE]),sum(table1[Actual])). The result seems correct,...
AmiraBedh
3 years agoSuper User
You are having an issue with the total because the formula is not accounting for the context of the calculation.
The missing part here is the aggregation over time so you may need TOTALYTD() :
LBEorACT =
IF(
ISBLANK(SUM(table1[Actual])),
TOTALYTD(SUM(table2[LBE]), 'table3'[Date]),
TOTALYTD(SUM(table1[Actual]), 'table3'[Date])
)
Can you also share your PBI file to have more info about your situation ?