Forum Discussion

Giovani's avatar
Giovani
Helper I
7 years ago
Solved

Condition with AND

Hi,    I am trying to create new column based on a previous one based with the condition if less then 10 = 1 ; if between 10 and 49 = 2 ; and if great then 50 = 3.  The desired output would be: ...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi Giovani ,

     

    Try this code.

     

    Column = SWITCH(True(),
                     'Value'[Total ]<=10,1,
                     'Value'[Total ]>10
                        && 'Value'[Total ]<50, 2, 'Value'[Total ]>=50,3,
                                -1)
     
     
     
    It has worked for me and here is my output: