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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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