Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi Everyone,
Im in need of help converting the below case statements to dax.
Case
WHEN ([SCODE]) = 47123
THEN((([Total Actual]+1350)+Case when isnull([Total Budget_Food]) then (-1*[Total Budget]) else [Total Budget_Food] END)/[Total ComparedOcc_FB]*[Max Negation])/((Case when isnull([Total Budget_Food]) then (-1*[Total Budget]) else [Total Budget_Food] END)/[Total Compared_Occ_FB])
ELSE(([Total Actual]+Case when isnull([Total Budget_Food]) then (-1*[Total Budget]) else [Total Budget_Food] END)/[Total Compared_Occ_FB]*[Max Negation])/((Case when isnull([Total Budget_Food]) then (-1*[Total Budget]) else [Total Budget_Food] END)/[Total Compared_Occ_FB])
END
Your assistance will be much appreciated.
Solved! Go to Solution.
@Anonymous , You can use Switch with True
example
Switch(True() ,
[SCODE]) = 47123 , [Total Actual]+1350 ,
isblank([Total Budget_Food]) , -1*[Total Budget],
divide([Total Budget_Food] END), [Total ComparedOcc_FB]*[Max Negation])
)
same way you can add another switch true
Switch-Case statement of #PowerBI: https://www.youtube.com/watch?v=gelJWktlR80&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=56
Hi @Anonymous,
Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
@Anonymous , You can use Switch with True
example
Switch(True() ,
[SCODE]) = 47123 , [Total Actual]+1350 ,
isblank([Total Budget_Food]) , -1*[Total Budget],
divide([Total Budget_Food] END), [Total ComparedOcc_FB]*[Max Negation])
)
same way you can add another switch true
Switch-Case statement of #PowerBI: https://www.youtube.com/watch?v=gelJWktlR80&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=56