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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

RLS - Custom filtering

Hey Guys  -  I've got this working with one user...now just need to replicate.  

 

I've created a new Role called  Customer Service Team.   We have 5 reps, and each are assigned a specific group of salespeople.   

 

The employee dimension table is linked to the relevant fact tables...orders...shipments.  

 

[Team] = "Team A" && [Name]= "Drew" || [Name] = "Jim"    (this is what I have in the Manage Roles area for this Role).   It's assigned to the employee dim table.

 

The above works perfectly for the one person I have assigned to this role.  So when I view the role in the service, as that user, it shows only information for his two salespeople:   Drew and  Jim.   

 

I now have to assign 4 more people to this role...each with their own specific salespeople.   I am thinking that perhaps some sort of IF or SWITCH statement that says if the customer service rep is Bob, then show Drew and Jim's stuff.    If the customer service rep is Mary, then show only Tom and Mike's stuff.   

 

I'd want to implement that in the Manage roles area - essentially just adding on to what I already created above.  

1 REPLY 1
lbendlin
Super User
Super User

"[Team] = "Team A" && [Name]= "Drew" || [Name] = "Jim"

 

Danger Zone! Danger Zone!  

 

This may not do what you may want it to do. To be safe and explicit, either use 

 

[Team] = "Team A" && ( [Name]= "Drew" || [Name] = "Jim")

 

or 

 

[Team] = "Team A" && [Name] IN {"Drew","Jim"}

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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