Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rayinOz
Helper III
Helper III

Replacing text in one column based on another column

Hello,

 

In PowerBI Desktop, I am wanting to replace text in one column based on what is in another column.

 

I have a tabled called UoM-TrainMe-Report. I have a column called Division and the other column called Organisation / Portfolio.

 

Basically, if in the column [organisation / portfolio] there is XYZ, change the text in the Division column to Other.

 

Thanks guys!

 

RayinOz

1 ACCEPTED SOLUTION
PowerBIUser3
Frequent Visitor

If you don't mind creating another column you can create a calculated column and use dax.

NewDivision = IF([organisation / portfolio] = "ZYX", "other", [Division])

 

If you have multiple organisations / portfolios values you want to do this for you can use OR or the logical or operator symbol ||

https://msdn.microsoft.com/en-us/library/ee634951.aspx

View solution in original post

2 REPLIES 2
PowerBIUser3
Frequent Visitor

If you don't mind creating another column you can create a calculated column and use dax.

NewDivision = IF([organisation / portfolio] = "ZYX", "other", [Division])

 

If you have multiple organisations / portfolios values you want to do this for you can use OR or the logical or operator symbol ||

https://msdn.microsoft.com/en-us/library/ee634951.aspx

CheenuSing
Community Champion
Community Champion

Hi @rayinOz

 

Basically this has to be done in the PowerQuery.

If you can share the data in onedrive and post the link, I can help you with the steps.

 

Cheers

 

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.