The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a product table where i have classified product family into P1,P2,P3 where i have put product x in P1 , now i have a RLS table having email, type of user like A,B,C
so let say if user of type A, B login then they should see the Product x in P1, but when user type C logins he shoudlnot see X in P1
so for this i have implemented RLS rule on table product and created a column in RLS table where get 1 if user type is C else 0 , and the rule is calculate max of column when equals to 1 then filter product table not having product x in it ,
so if C logins he wont see X in P1 but others can
Now i have another issue that when admin logins and if he filters by slicer values of A,B,C there are values under this , so if he select values from A or B he should see what visible to Type A/B user type and when select C he should see what visible to C that is he should not see X when select C value
Can anyone please suggest
Thanks you
Hi, @Devender9999
you want to implement Row-Level Security (RLS) with additional functionality for an admin user.
From your description, I'll break it down step by step:
Refer: https://learn.microsoft.com/en-us/power-bi/enterprise/service-admin-rls
Proud to be a Super User!
thanks for your response, yes thats exactly what i need, but not sure how to do it ? by measure can we achive it??
Follow these steps. Also check the document on how to implement RLS.
In your RLS table, you have a column that assigns a 1 if the user type is C and 0 otherwise. Let's name this column IsTypeC.
Create an RLS rule:
The logic here is that the data will be visible either if the user is not of type C (IsTypeC <> 1) or if the product isn't X in P1.
2. Implement the Admin Logic
For the admin user, you need to modify the rule to take into account the slicer selection:
Firstly, create a disconnected table for your slicer (let's name it AdminSlicer) that has a single column called UserType with values A, B, and C.
Now, modify the RLS rule to:
However, please keep in mind that Power BI's RLS doesn't recognize slicer values in the way you're thinking.
Proud to be a Super User!
Thanks alot appreciate you for such a great response, I may ask you should i need to write this dax in product table or in RLS table cause in your dax you are refering to columns from both tables and when i am writing it is giving error and one more thing to clarify that under type A,B,C there are values there are name of columns in RLS table for example let say a01 is a user under type A
thank again
User | Count |
---|---|
81 | |
74 | |
42 | |
30 | |
28 |
User | Count |
---|---|
108 | |
96 | |
53 | |
48 | |
47 |