Forum Discussion

Nashghoul's avatar
Nashghoul
New Member
4 years ago
Solved

DAX SWITCH for Loyality

Hi There,

 

I'm new to this power BI, and i have strugling with these matter.

Please help me how to use DAX Switch function based on data above.

Thanks

  • Hi,

    Please try the below.

    It is for creating a new column.

     

    Loyality CC = 
    SWITCH (
        TRUE (),
        Customer[Purchased Amount] <= 30, "Level C",
        Customer[Purchased Amount] <= 60, "Level B",
        Customer[Purchased Amount] > 60, "Level A"
    )

1 Reply

  • Hi,

    Please try the below.

    It is for creating a new column.

     

    Loyality CC = 
    SWITCH (
        TRUE (),
        Customer[Purchased Amount] <= 30, "Level C",
        Customer[Purchased Amount] <= 60, "Level B",
        Customer[Purchased Amount] > 60, "Level A"
    )