We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
Hi every body,
I have a dat and I work with Power BI Desktop, and I want befor to start my analysis to anonymize(mask) the first name column and the last name column(and replace by a ID code).
Any ideas how to create unique masked customer names with Power BI?
Thank you.
Best regards,
Solved! Go to Solution.
One way of preventing anonymised names from being merged in visualisations is to make sure they are not the same.
Add a calculated column:
Anonymised = "Airline " & RANKX('MyTable','MyTable'[CustomerName],,ASC,Dense)
Result:
Airline 1 Airline 2 Airline 3 ...
If you prefer x's:
Add a Anonymised_Name table,
Name Anonymised Name "Air Holland" "Air xxxxxxx" "Air Hungary" "Air xxxxxxx " "Air Iceland" "Air xxxxxxx "
Use "fake space" (alt+0160 on the numpad) to prevent PowerBI from swallowing it up. Add a relationship and use this column in visualisations.
I prefer previous option as it makes it easier to distinguish and keep track of individual customers.
If you don't care whether number of "x"s matches real name:
Anonymised_Name_2 = "Air XXXXXXX" & REPT(" ", RANKX('MyTable','MyTable'[CustomerName],,ASC,Dense))
(again fake space alt+0160)
Depending on what you do with your report, there is a significant risk of real customer names "leaking", so ideally you would want to anonymize your data before importing it.
One way of preventing anonymised names from being merged in visualisations is to make sure they are not the same.
Add a calculated column:
Anonymised = "Airline " & RANKX('MyTable','MyTable'[CustomerName],,ASC,Dense)
Result:
Airline 1 Airline 2 Airline 3 ...
If you prefer x's:
Add a Anonymised_Name table,
Name Anonymised Name "Air Holland" "Air xxxxxxx" "Air Hungary" "Air xxxxxxx " "Air Iceland" "Air xxxxxxx "
Use "fake space" (alt+0160 on the numpad) to prevent PowerBI from swallowing it up. Add a relationship and use this column in visualisations.
I prefer previous option as it makes it easier to distinguish and keep track of individual customers.
If you don't care whether number of "x"s matches real name:
Anonymised_Name_2 = "Air XXXXXXX" & REPT(" ", RANKX('MyTable','MyTable'[CustomerName],,ASC,Dense))
(again fake space alt+0160)
Depending on what you do with your report, there is a significant risk of real customer names "leaking", so ideally you would want to anonymize your data before importing it.
Thank you Lewis.
User | Count |
---|---|
62 | |
59 | |
46 | |
35 | |
31 |
User | Count |
---|---|
85 | |
71 | |
57 | |
51 | |
46 |