Forum Discussion
kokoro_1202
5 years agoHelper I
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...
- 5 years ago
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" )
kokoro_1202
5 years agoHelper I
how shoulld the formula be to "a" to replace 000 i tried replace but it doesnt work?
Replace = (Table[CustomerID],1,3,"a"),
could you advice me again?
Anonymous
5 years agoNot applicable
Hi kokoro_1202
This might help your requirement
Result = If ( Len(Cust[CustomerID]) = 3 , "Z" & Cust[CustomerID] , IF( LEFT(Cust[CustomerID],3) = "000" , "U"&SUBSTITUTE(Cust[CustomerID],"000","a"),Cust[CustomerID]))