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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Hickling
Frequent Visitor

Redacting based on table value

Hi team. I use Power BI to report safety incidents. We have an issue with incident descriptions containing people's names. I was wondering if the following is possible:

 

Have a table that contains all first names and last names in the business. Using that name table, in my incident description column, tell it if it finds any of those names in the incident text to replace each one with <redacted>. We're talking tens of thousands of incidents and over 2000 employees so doing things manually isn't an option. Can't manipulate the source data either as it is a scheduled dump out of the incident database.

3 REPLIES 3
Hickling
Frequent Visitor

Hi, thanks I will post some dummy data and expected response.

 

In table A I have incident numbers and incident descriptions:

 

Inc NumberInc Description
501David fell and broke his wrist
502When doing something, Thomas Smith hurt his back, Karen assisted with first aid

 

In table B I have the same incident numbers and people listed as involved in the confidential people section

 

Inc NumberName
501Baker, David
501Davis, Alan
502Brown, Karen
502Smith, Thomas

 

My expected outcome in table A would be:

 

Inc NumberInc Description
501<Redacted> fell and broke his wrist
502When doing something, <Redacted> <Redacted> hurt his back, <Redacted> assisted with first aid

 

Hopefully that makes it clearer. I have tens of thousands of rows of incident descriptions, so if possible I would like it to use the common incident number between tables and just search for the names from table B in the description in table A on a row by row basis in table A to save on refresh times.

v-xulin-mstf
Community Support
Community Support

Hi @Hickling

 

Maybe you can implement this feature in power query.

Could you provide sample data and expected output after removing sensitive data?
Sample data and expected output would help tremendously.
Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Best Regards,
Link

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

Pragati11
Super User
Super User

HI @Hickling ,

 

Yes it is possible to do this with a different table having Names and then doing a SEARCH and REPLACE on the DESCRIPTION column in the other table.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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