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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.