Forum Discussion

kokoro_1202's avatar
kokoro_1202
Helper I
5 years ago
Solved

help on conditional formatting or nested if

hi all I have a list of customer id from the system which is not accurate, is it possible to achieve the following with power bi as a new column? Any advice is appreciated.   Thank you so mu...
  • themistoklis's avatar
    5 years ago

    kokoro_1202 

     

    Try the following formula:

    New Column = 
    SWITCH( TRUE(),
    LEFT(Table[CustomerID],1) = "w" , Table[CustomerID],
    LEFT(Table[CustomerID],3) = "000" , "u" & Table[CustomerID],
    LEN(Table[CustomerID]) = 3 , "z" & Table[CustomerID],
    "Other"
    )