Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello All,
We have requirement to anonymize data(field values) for some of the users and it should work dynamically.
I have Employee table with employee details and one new field has been introduced called "Anonymized" with values Yes and No.
Currently, RLS is applied on employee table (employee name=userprinciplename()).
There are two table charts in Power BI which uses direct columns(name,email,phone) from different DIM table(Customer details). The requirement is if user belong to anonymized category(Yes) then all the field should show as "Anonyized" else show actual values.
Request you all to please guide or share me the related link to achieve such requirement.
Thanks in advance.
Solved! Go to Solution.
Hi @SarikaKumari18 ,
Has your problem been solved?
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @SarikaKumari18 ,
Has your problem been solved?
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @SarikaKumari18 ,
Is this what you want?
Step1, Set RLS.
Step2, Set the data with [Anonymized data]="YES" to anonymous.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @v-lionel-msft , could you please elaborate the step 2 in your solution. It might help if you can share the RLS logic .
Hi @v-lionel-msft ,
Thanks for looking into this. we have written below measure to meet the requirement.
@amitchandak
Hi Amit, I am writing the below measure
You can try like this ?
sumx(values(Table[employee]) , if(max(Table[Anonyized]) ="Yes", [measure1], [measure2]))
Thanks for a quick response ,
I have tried the above DAX and it throws me an error : "the function sumx cannot work with values of type string"
@amitchandak Could you please help me to resolve this and also, the solution should work dynmically based on user log in.
It would be great help and really appreciate this.
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
60 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |