Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Switch in M

Hi Team, How to write this is M query (Condition coloum) results = SWITCH(TRUE(),'table'[Q2 Converted] = 0,"N/A",'table'[Q2 Converted] >= 'table'[Baseline converted],"Yes","No")    
  • v-xulin-mstf's avatar
    5 years ago

    Hi Anonymous,

     

    You can try:

    if [Q2 Converted]=0
    then "N/A"
    else if [Q2 Converted]>=[Baesline converted]
    then "Yes"
    else "No")

    If you still have some question, please don't hesitate to let me known.‌‌

     

    Best Regards,

    Link

     

    Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!