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
Ritesh_Air
Post Patron
Post Patron

RLS but need to compare at Region and National Level

Hi,

 

So I have Retailer data and row level security defined which works fine. When our sales guy logs in, they see their Retailers, not any one elses.

 

But now, I want to compare this one Retailer to Region (which has multiple Retailers) and to National (which has multiple Regions).

 

But RLS restricts me to see anything beyond my assigned Retailer when I log in as (View As). How do I resolve this convoluted situation?

 

Thanks in Advance,

Ritesh

 

 

1 ACCEPTED SOLUTION

Hi @Ritesh_Air,

Perhaps you can reference the raw table region field to link this table, then records will be filtered by the current RLS filter.

How did these table relationships mapping? Can you please share some of your data structure to help us clarify your scenarios?

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

5 REPLIES 5
v-shex-msft
Community Support
Community Support

Hi @Ritesh_Air,

The most simple solution I think is duplicate query tables at the query editor side and processed on them to keep some general values/information then you can use to compare with records that filtered by RLS. (Notice: this copied summary table required not to have relationships to other tables or it will be filtered by RLS effect through relationships)
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Thanks @v-shex-msft @amitchandak 

 

I am able to create a summary table just with National number. As national number won't change for any retailer, I can have a card next to Retailer number.

 

It gets little interesting when I want to compare it to Regional number. How do I force it to have just their own Region numbers? With the below formula, if I un-comment Line 4 then I can get all the Regions. But then I just want to show Retailers their own region, not all the regions.

 

Here is National:

 

Ritesh_Air_0-1600657455251.png

 

 

 

Ritesh_Air_1-1600657218993.png

 

 

Thanks,

Ritesh

Hi @Ritesh_Air,

Perhaps you can reference the raw table region field to link this table, then records will be filtered by the current RLS filter.

How did these table relationships mapping? Can you please share some of your data structure to help us clarify your scenarios?

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@v-shex-msft 

 

Yes, that did the trick.

 

thanks,

ritesh

amitchandak
Super User
Super User

@Ritesh_Air , I think for this you might have to create a summary table and use that.

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.