Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I'm trying to implement RLS on a dashboard such that when the user logs in, they only see their data. The challenge I'm running into is that individual needs to see their data relative to the team and league averages. As soon as I view roles as another user, it applies RLS to the team and league average. I understand why this is happening, i'm just struggling to find a workaround.
I've tried creating calculated columns for team and league average as I read that is one way of ignoring RLS but haven't been able to get it to work. This is a snapshot of my dashboard.
Any insight would be greatly appreciated!
Hi @sheidari ,
"...As soon as I view roles as another user, it applies RLS to the team and league average... "
Do you want RLS not to work on team and league average but to other data?
Maybe you can refer to the article?
Dynamic RLS (row level security) with Power BI
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.
You want to create a disconnected table of your teams and leagues and have a column in there that calculates the averages for your teams and leagues.
As this is a disconnected table, RLS will not apply to it unless you create some new RLS rules.
Let's say I have a disconnected fact table 2. if i use fact table 2 to calculate the team avg, then how will this table know to calculate the team avg for say team 5 (the team which the employee belongs to when RLS is applied on the first fact table)? W/o joining the two fact tables together, wouldn't you need to add a separate filter/slicer to manually select the team in order to calculate the right average?
Sometimes you need to have more than one fact table that covers the same data. you could have the fact tables about teams and games that were covered by RLS and then have a snapshot that aggregated wins and loses that was not covered by RLS and draw the information you need for the comparisons from that.
in the documentation it says "Question: Does RLS let me hide detailed data but give access to data summarized in visuals?
Answer: No, you secure individual rows of data but users can always see either the details or the summarized data."
but i think if the aggregate data was in a separate snapshot table, this restriction would not apply
Help when you know. Ask when you don't!
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
117 | |
101 | |
71 | |
61 |