Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi All,
I need urgent help to mask the PII data in my Table visual for the personal data-related columns in my power bi report.
I have 2 types of users.
1. PII Users
2. Non-PII Users
if the user belongs to PII User type, he should be able see the PII columns data. if non-PII user, personal information columns data should be maskes as XXXXXXX.
I have a user table in my redshift database and having 2 columns. 1. user email id 2. PII User(Y/N).
My question is I can't join my user information table with my report query because there is no unique user column in my report query.
May I know in this scenario, how to mask my report data?
Would approciate if you can share the required measures DAX code.
Thanks,
Srini
Solved! Go to Solution.
Hi @Koritala ,
Thank you for reaching out to Microsoft Fabric Community.
Thank you @Ritaf1983 @Thejeswar for the prompt response.
I have created PBIX file using sample data for Dynamic masking.Please go through the attached PBIX for your reference, even I have tested by replacing USERPRINCIPALNAME() with the email id existing in my UserAccess table.It worked for me.
It shows real data for users with "Y" in IsPIIUser.
It shows asterisks for users with "N" in IsPIIUser.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Hi @Koritala ,
Thank you for reaching out to Microsoft Fabric Community.
Thank you @Ritaf1983 @Thejeswar for the prompt response.
I have created PBIX file using sample data for Dynamic masking.Please go through the attached PBIX for your reference, even I have tested by replacing USERPRINCIPALNAME() with the email id existing in my UserAccess table.It worked for me.
It shows real data for users with "Y" in IsPIIUser.
It shows asterisks for users with "N" in IsPIIUser.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Hi Venu,
Appreciate your solution. it is working as expected. Thanks for your support.
Hi @Koritala
In Power BI, there is no native support for masking column values like "XXXXXX" based on user type. What you can do instead are the following two approaches:
Row-Level Security (RLS) – You can restrict entire rows based on user access. However, this won't allow you to show/hide or mask specific column values based on user identity. Column-level security is not natively supported.
More information is by the link:
https://www.youtube.com/watch?v=jphj40tBPD8
Separate Report Versions – You can create two versions of the report: one for PII users and another for non-PII users (where sensitive columns are removed or replaced with placeholders). Then, use audience targeting in the Power BI app to share each version with the appropriate group.
https://www.youtube.com/watch?v=nchNa44o2D4
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi @Koritala ,
You can use the REPT() DAX function to perform Data Masking of a certain column like shown below
For example, I am masking the food supply level column. You can use substring to control the number of characters that you want to mask
MaskedData = REPT("*", LEN([Food_Supply_Level]))
Using Substring:
If this helps, Accept this as a Solution and Appreciate with a Kudo!
Regards,
Hi, it should be dynamic masking not static
User | Count |
---|---|
85 | |
79 | |
64 | |
52 | |
46 |
User | Count |
---|---|
101 | |
49 | |
42 | |
39 | |
38 |