Forum Discussion
Rubal
7 years agoHelper II
if or a switch statement
Hi , I am new to Power BI and need some help with the below case. Appreciate if someone can help with the DAX formula for the case. I am not sure IF of SWITCH statement works best for the below c...
- 7 years ago
Hi Rubal ,
It seems that you need to chang your query to dax in power bi.
Based on your logic, we could create the dax like below.
= IF ( Field1 = "AAA", "RETAIL * GROWTH FACTOR" && "ONLINE * GROWTH FACTOR", IF ( Field1 = "BBB", "RETAIL" && "ONLINE" ) )However, more details about your scenario will be more helpful.
If it is convenient, could you share your data sample which could reproduce your scenario so that we could help further on it?
Best Regards,
Cherry
Rubal
7 years agoHelper II
yes, I have. Need the formula example for my specific case though
v-piga-msft
7 years agoResident Rockstar
Hi Rubal ,
It seems that you need to chang your query to dax in power bi.
Based on your logic, we could create the dax like below.
=
IF (
Field1 = "AAA",
"RETAIL * GROWTH FACTOR" && "ONLINE * GROWTH FACTOR",
IF ( Field1 = "BBB", "RETAIL" && "ONLINE" )
)
However, more details about your scenario will be more helpful.
If it is convenient, could you share your data sample which could reproduce your scenario so that we could help further on it?
Best Regards,
Cherry