Forum Discussion

Tabita88's avatar
Tabita88
New Member
4 years ago

Replace several values with three from same column

Hello,

 

I struggle with a situation and I need your help to understand how to solve it.

I have a query in Power BI and I want to replace information from one column as mention below. I know how to use Replace button but I have 60 values to replace with "Others" and I was hoping that you have a shortcut for me:)

For example, I don't know if there is formula I can use to replace several catogories from one column to a single category, for example: replace "Testing team", "Application team" with "Others".

 

 

 

CategoryNew category
Support Europelocal team
Global supportL2
Testing teamothers
Application teamothers
Improvement teamothers

 

Thank you in advance.

Tabita

2 Replies

  • Tabita88 , A new column

    Switch(True() ,

    [Category] = "Support Europe" ,"local team",
    [Category] = "Global support" ,"L2",

    "Others")

  • tamerj1's avatar
    tamerj1
    Icon for Community Champion rankCommunity Champion

    Hi Tabita88 
    With power query you can perform left outer join and retrieve the new values, you can then add a conditional column where if the new value is null return the old of and if not return the new one.

    With DAX you can have 'Repalcements' as a lookup table tp retrieve the new name whenever needed.