Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Lookupvalue override RLS

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"

EmployeeUnit
AB121
BF322
DS162
KM671
ET231

 

"Emp"

EmployeeUnitEmployee (lookupvalue)
AB121AB12
BF322 
DS162 
KM671KM67
ET231ET23

 

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. 

5 REPLIES 5
montoyesco
Helper I
Helper I
montoyesco
Helper I
Helper I

I have the same issue: LOOKUPVALUE overrrides the RLS context.

Anonymous
Not applicable

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...

v-juanli-msft
Community Support
Community Support

Hi @Anonymous

Have a look to check if this suit your scenario.

Dynamic RLS via Hierarchy in Power BI

 

Best Regards

Maggie

Anonymous
Not applicable

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. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.