Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi!
I'm trying to create a (impossible?) RLS model that can show almost all data for all users except a few values should be hidden.
In my case I want a user to see financial data for several units but only be able to drill it down to person level for his/her own staff.
My case: I have an employee table "Emp" that contains employee and unit values, unit is related to my organisation table and employee to my sales fact table.
I created a dublicate table of "Emp" called "Emp2" and kept it without relationships. I apply RLS on "Emp2" and then create a calculated column in "Emp" that does lookupvalue from "Emp2".
Expected result (RLS Unit=1):
"Emp2"
Employee | Unit |
AB12 | 1 |
KM67 | 1 |
ET23 | 1 |
"Emp"
Employee | Unit | Employee (lookupvalue) |
AB12 | 1 | AB12 |
BF32 | 2 | |
DS16 | 2 | |
KM67 | 1 | KM67 |
ET23 | 1 | ET23 |
If this would work i would hide the original Employee column and only have Employee (lookupvalue) avaliable, so users can see values from both units but when they drill down to employee the get it grouped as (Blank) for units other than their own.
The problem: RLS works fine when I look at "Emp2" table, but in "Emp" all Employees are visible in the calcualted column.
I just published this case in a forum:
https://community.powerbi.com/t5/DAX-Commands-and-Tips/LOOKUPVALUE-overrides-RLS/m-p/1195715#M19012
I have the same issue: LOOKUPVALUE overrrides the RLS context.
And if you extend the column? If Unit = 1, Employee, "". So it will be empty when it's not 1. Not sure if this can help for you, but it can be a workaround...
Hi @Anonymous
Have a look to check if this suit your scenario.
Dynamic RLS via Hierarchy in Power BI
Best Regards
Maggie
Thanks, but I don't think that solves it. In that example it's all about hiding all data of some regions, my problem is that I only want to limit the details in some regions.
For example, I've got four regions, the region manager should see the total sales per region of all regions but only be able to drill down on individual sales in his own region.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |