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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
chat_peters
Helper III
Helper III

Dynamic parameter for filtering

Hello,

 

I have a data model that I am trying to implement RLS on. This is 100% on direct query so creating a RLS column is not possible. I want to explore parameters for filtering my dataset based on worker ID. This is what my data model looks like. I have configured and RLS role on the worker table. 'Worker'[Worker ID] = CUSTOMDATA(). What I want to happen is when I pick a worker ID I want to be able to filter the Region to show the relevant specialty IDs and since the Region table filters the Fact table It will only show the relevant Incidents that match with the specialty. We are doing the filtering through specialty ID.  worker is related to the region through specialty ID. Region is an aggregated table by specialty. How can I achieve this via one or two parameters?

chat_peters_0-1708979836686.png

Here's the link to my file. This is end result I want to see, If worker 1 is logged in then he should see all the incidents with the same specialty IDs that he has access to.

chat_peters_1-1708980489928.png

 

1 ACCEPTED SOLUTION
chat_peters
Helper III
Helper III

I did not need a dynamic parameter. I just needed one RLS rule in the worker table. then a bi-directional relationship (with security filter applied to both directions as this is many to one relationship) to the Region table to filter the Region table by the RLS rule that gets applied to the worker table when a worker logs in. Region table filters the fact table so the logged in worker will only see what they are allowed to see. 

If there are other dimension tables attached to the fact table then I will have to filter by a measure in the fact table to make sure the RLS rule gets carried through. 

View solution in original post

2 REPLIES 2
chat_peters
Helper III
Helper III

I did not need a dynamic parameter. I just needed one RLS rule in the worker table. then a bi-directional relationship (with security filter applied to both directions as this is many to one relationship) to the Region table to filter the Region table by the RLS rule that gets applied to the worker table when a worker logs in. Region table filters the fact table so the logged in worker will only see what they are allowed to see. 

If there are other dimension tables attached to the fact table then I will have to filter by a measure in the fact table to make sure the RLS rule gets carried through. 

lbendlin
Super User
Super User

You must avoid having an arrow pointing back into the RLS table. 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.