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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
dukeof3arl
New Member

Replacing Text values using IF statements

Hey all,

 

I'm trying to replace values of a manager that has an incorrect manager assigned to a team member.  The manager and team member have their own separate columns.

 

Where "Joe Smith" is the manager assigned to "Jane Doe", replace "Joe Smith" with "Robert Regular"

 

Let me know if that makes sense.

1 ACCEPTED SOLUTION
Dinesh_Suranga
Continued Contributor
Continued Contributor

@dukeof3arl ,

Hi.

Add a new column in power query.

if [Manager Column] = "Joe Smith" and [Team Member] = "Jane Doe" then "Robert Regular" else [Team Member]

 Thanks

View solution in original post

4 REPLIES 4
Dinesh_Suranga
Continued Contributor
Continued Contributor

@dukeof3arl ,

Hi.

Add a new column in power query.

if [Manager Column] = "Joe Smith" and [Team Member] = "Jane Doe" then "Robert Regular" else [Team Member]

 Thanks

This is the answer!  However, you need to reverse the logic here.

 

if [Team Member] = "Jane Doe" and [Manager] = "Joe Smith" then "Robert Regular" else [Manager]

vojtechsima
Super User
Super User

Hi, @dukeof3arl 
In Power query either transform column as this:

vojtechsima_0-1668196271211.png

= Table.TransformColumns(#"Changed Type", {"ManagerToReplace", each if _ = "Joe Smith" then "Robert Regular" else _})

Or simply click

vojtechsima_1-1668196304842.pngvojtechsima_2-1668196320850.png

 

 





Any kudos or recognition appreciated. To learn more on the topic, check out my blog and follow me on LinkedIn.

Ahh - I should've mentioned that I can't use that route because Joe Smith has many other team members assigned to him that need to remain the same.  So Jane Doe is the issue.  Where Jane Doe has Joe Smith as the manager, I ONLY want to replace her values of "Manager" with Robert Regular.  

 

EDIT:  And thanks for the speedy reply!

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors