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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Dyanmic RLS based on User's location?

Hi, 

 

I've been searching about RLS for some time now and I couldn't find a way to filter data based on location column.

So basically i need a dynamic RLS which will see the user's location when he/she will login. I have a user table which have email, names, office location, job title. 

 

Cheers

 

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous 

Normally RLS is used with email id.

However, in your case Wit will depend on kind of location data do you have. (Country, state, county, zip)

Assuming you have the zipcode then access the user's zip code using the below site or use use a site as per your convinience and company standards.

My Zip Code - What is My Zip Code? (my-location.org)(I used google to get this)
Save this zipcode as a datasource and use it to setup your RLS.

Hope this helps.

Anonymous
Not applicable

Hi Pranit, 

I don't have zip code. in the office location we have cities such as Sydney, Queensland or melb. Is there a way to tackle this? 

Hi @Anonymous ,

 

Unfortunately, there are no DAX expressions like USERNAME() to get the user's location information.

Is it true that the same user, logged in different regions will get different data results? If so, there may be no way to achieve that. You can suggest your idea on power bi ideas.

 

If not, you might consider creating a region table. The region table contains the location and what data can be viewed. The user table (the table you mentioned above) controls the region table and the region table controls the underlying data table, see this article for details.

https://radacad.com/what-do-you-need-to-implement-dynamic-row-level-security-in-power-bi 

 

Or, you can create many roles and add members in these roles in power bi service. These members can be a group (Distribution Group,Mail-enabled Group,Security Group). Users from different locations are added to different groups. By doing this to implement location-based RLS.

Row-level security (RLS) with Power BI - Power BI | Microsoft Docs

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

.

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.