Forum Discussion
harirao
1 year agoPost Prodigy
Issue with DAX Calculations – Incorrect Results in Power BI
Hi All, I have created two DAX measures, but I’m not getting the expected results in Power BI. Below are the details: 1) Subtraction: [Order RSD] - [Qtr Baseline Fcst] Qtr Baseline Fcst = LO...
- Anonymous1 year ago
Hi harirao,
For division, [Order RSD] must be recalculated per row using CALCULATE + FILTER, and baseline fetched using LOOKUPVALUE, so both values align per row.
Regards,
Vinay Pabbu
harirao
1 year agoPost Prodigy
Hi Anonymous
I was able to find a solution for the subtraction logic [Order RSD] - [Qtr Baseline Fcst] using the below DAX:
TO GO =
SUMX(
'09_Data',
VAR baseline = LOOKUPVALUE(
Base[Total],
Base[CONCATENATE],
'09_Data'[CONCATENATE]
)
VAR orderRSD =
CALCULATE(
[Order RSD],
FILTER(
ALL('09_Data'),
'09_Data'[CONCATENATE] = EARLIER('09_Data'[CONCATENATE])
)
)
RETURN
orderRSD - baseline
)
However, when I apply a similar approach for division, i.e., [Order RSD] / [Qtr Baseline Fcst], it doesn't return the expected results.
Do you have any suggestions on how to resolve this issue?
Thanks in advance for your help.
Best regards,
- Anonymous1 year agoNot applicable
Hi harirao,
For division, [Order RSD] must be recalculated per row using CALCULATE + FILTER, and baseline fetched using LOOKUPVALUE, so both values align per row.
Regards,
Vinay Pabbu