Forum Discussion
Mk60
2 years agoResolver I
How to replace nested IF calculation for New Column with using switch
This nested if calculation DOES work fine, but I have hard time replacing this using SWITC function? I amm affraid that if I have much longer nested calc it might be safer to use switch instead. Can ...
- 2 years ago
I believe this would be better done in Power Query using conditional columns. To answer your question, you could use switch/true
=SWITCH(TRUE(),
Query1[PRODUCT]="20","Prod1",
Query1[PRODUCT]="CC-20b","Prod2",
etc
also, use daxformatter.com to make it easier to read.
MattAllington
2 years agoCommunity Champion
I believe this would be better done in Power Query using conditional columns. To answer your question, you could use switch/true
=SWITCH(TRUE(),
Query1[PRODUCT]="20","Prod1",
Query1[PRODUCT]="CC-20b","Prod2",
etc
also, use daxformatter.com to make it easier to read.
- Mk602 years agoResolver I
Thanks a lot Matt! Much apprecite your time and help, and the suggestion to check daxformatter.