Forum Discussion

PGAT's avatar
PGAT
Helper III
6 years ago
Solved

IF - Multiple conditions

Hi, I have 3 x columns as condition, and my outcome will be a score number.  I am am new to DAX.  Can someone share with me what is wrong with my formula? No syntax error.  Do I put the score number ...
  • Anonymous's avatar
    Anonymous
    6 years ago

    PGAT 
    You create the column in Query Editor which is M formula. I would recommend you to create a column with DAX not M query. The dax formula is something like:

     

    Column = SWITCH(True(),
    [BKR TYPE]="KCD" && [JOB TYPE]="OB" && [MODE]="SEA",3,
    [BKR TYPE]="KCD" && [JOB TYPE]="OB" && [MODE]="AIR",1.5,
    [BKR TYPE]="KCD" && [JOB TYPE]="IB" && [MODE]="SEA",2,
    ...
    ...
    ...)

     


    Paul Zheng _ Community Support Team
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.