Forum Discussion
Replicate Dax SWITCH code in Query editor
Hi is there a way to add a custom column in query editor and replicate this dax code
Hi Pandadev ,
Your closing brackets are wrong.
IF ([Event Code]="Q3" AND [MarketSector]="Commercial") THEN "AW"
ELSE IF ([Researcher]<>"SLR" AND [OperatorTypeCode]="16") THEN "SLR"There is a nice example on the following blog:
https://www.fourmoo.com/2018/11/27/multiple-conditions-for-a-conditional-column-in-power-query/Thanks,
Pragati
6 Replies
- Pragati11Super User
Hi Pandadev ,
You can add a custom column on Query Editor in Power BI using IF-ELSE multiple conditional statements. Read more about it here: https://docs.microsoft.com/en-us/powerquery-m/m-spec-conditionals
Thanks,
Pragati
- PandadevPost Prodigy
Thanks I looked at that solution , but I need it to check two different criteria , which was not available in the conditional column
in this example below it is looking at Event Code =Q3 and MarketSector = Commercial , then change to AW
AND([Event Code]="Q3", [MarketSector]="Commercial"), "AW",