Reply
User57639205
Frequent Visitor
Partially syndicated - Outbound

Power Query Help - removing values in one column if they appear in another

I have some nomination data, which includes nominee name and nomination comment. For data protection purposes i am not allowed to include any personal details in my dashboard. I would ideally like to produce a word cloud or similar showing common nominations reasons but i dont want to include the names which nominators have included  in the comment section. 

 

Nominee NameNomination Comment
John SmithJohn Smith is supportive and patient leader

 

Where Nominee Name is present in Nomination Comment, is there a way to remove it?

Thanks

1 ACCEPTED SOLUTION
v-weiyan1-msft
Community Support
Community Support

Syndicated - Outbound

Hi @User57639205 ,

 

Based on the sample and description you provided, you can try code as below to add a custom column in Power Query.

vweiyan1msft_0-1710384273679.png

Text.Replace([Nomination Comment], [Nominee Name], "")

vweiyan1msft_1-1710384304443.png

Result is as below.

vweiyan1msft_2-1710384317822.png

Is this the result you expect?


Best Regards,
Yulia Yan


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-weiyan1-msft
Community Support
Community Support

Syndicated - Outbound

Hi @User57639205 ,

 

Based on the sample and description you provided, you can try code as below to add a custom column in Power Query.

vweiyan1msft_0-1710384273679.png

Text.Replace([Nomination Comment], [Nominee Name], "")

vweiyan1msft_1-1710384304443.png

Result is as below.

vweiyan1msft_2-1710384317822.png

Is this the result you expect?


Best Regards,
Yulia Yan


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)