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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
User57639205
Frequent Visitor

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

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

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.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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