Forum Discussion
Wrong Subtotal when using Variable
Hello,
I get a wrong result in my subtotal when I utilize a variable.
I use months as a filter.
I cannot see the connection.
Diff Actual Billing - Budget =
Var DiffActualtoBudget = [Total Actual Billing] - [Total Budget]
RETURN
//DiffActualtoBudget
IF(
HASONEVALUE(dimCalendar[MonthYear]),
DiffActualtoBudget,
SUMX(
VALUES(
dimCalendar[MonthYear]),
DiffActualtoBudget))
Please see screenshot.
Thank you,
Tamir
6 Replies
- v-frfei-msftCommunity Support
Hi Anonymous,
Could you please share your pbix to me so that I can help with that?
Regards,
Frank
- AnonymousNot applicable
Hi v-frfei-msft
Unfortunately, I cannot share that pbix file.
Can you see clearly the formulas or do I need write it in the thread?
Regards,
Tamir
- v-frfei-msftCommunity Support
Hi Anonymous,
I made one sample here, However that the measure seemed worked well in my side. Could you please share your sample data to me if possible? And what are the formulas of your [Total Actual Billing] and [Total Budget]?
Attached the pbix for your reference.
https://www.dropbox.com/s/2rl06yza5z6opmg/Wrong%20Subtotal%20when%20using%20Variable.pbix?dl=0
Regards,
Frank