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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Manage Roles.

Hi,

I have a scenario where in I need to  manage role based on the Country.

Given Data - 

 

Name RoleCountryTotalAmount
xyz@xyz.comSalesFrance1000
abc@xyz.comAccountItaly2000
def@xyz.comSLFrance3000
ghi@xyz.comSLFrance4000
xyz@xyz.comSalesSpain5000
abb@xyz.comSLSpain6000

 

What needs to be achieved when user "xyz@xyz.com" logs in - 

[Sales User Role]  -> if logged in user role ="Sales" then read the Country Name, and now show all the users under these selected countries.

 

expected output when "xyz@xyz.com" logs in (must show all the users from France and Spain because "xyz@xyz.com" is linked to France and Spain only) -

 

Name RoleCountryTotalAmount
xyz@xyz.comSalesFrance1000
def@xyz.comSLFrance3000
ghi@xyz.comSLFrance4000
xyz@xyz.comSalesSpain5000
abb@xyz.comSLSpain6000

 

Thanks.

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous, 

 

You can create a RLS role with filter defined below: 

 

Search('Table'[Country],CONCATENATEX(FILTER('Table','Table'[Role]="Sales"),'Table'[Country],","),1,0)>0

 

q4.PNG

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous, 

 

You can create a RLS role with filter defined below: 

 

Search('Table'[Country],CONCATENATEX(FILTER('Table','Table'[Role]="Sales"),'Table'[Country],","),1,0)>0

 

q4.PNG

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-qiuyu-msft,

This is exactly what I have been looking for. 

Thanks a lot for quick response.

 

 

Anonymous
Not applicable

@v-qiuyu-msft,

 

I have an extended scenario where in now we need to check if a user is either SALES or ACCOUNT then show all rows wd the countries these two users have.

using the below dax, it is showing the data for the countries which are linked to Role = ACCOUNT and SALES when the SALES User logs in.

I want to show only Sales User countries and not Account user countries when Sales logs in n vice versa.

Also, there can be multiple Sales and Account users. but my requirement is to filter on countries of the logged in users only.

ex - sales user 1 - France and Spain 

sales user 2 - Greece and Egypt.

Account user - Italy

so if Sales user 1 logs in, it must show all records for France and Spain only or

 if Account user logs in, it must show all records for Italy only.

SEARCH(Table[Country],CONCATENATEX(FILTER(Table,Table[Role]="Account"||Table[Role]="Sales"),Table[Country],","),1,0)>0
 
Given data - 
 
Name RoleCountryTotalAmount
xyz@xyz.comSalesFrance1000
abc@xyz.comAccountItaly2000
def@xyz.comSLFrance3000
ghi@xyz.comSLFrance4000
xyz@xyz.comSalesSpain5000
abb@xyz.comSLSpain6000
abc.11@xyz.comSSItaly2000

 

Expected, when Sales user logs in ( xyz@xyz.com) -

 

Name RoleCountryTotalAmount
xyz@xyz.comSalesFrance1000
def@xyz.comSLFrance3000
ghi@xyz.comSLFrance4000
xyz@xyz.comSalesSpain5000
abb@xyz.comSLSpain6000

 

Expected, when Account user logs in ( abc@xyz.com) -

 

Name RoleCountryTotalAmount
abc@xyz.comAccountItaly2000
abc.11@xyz.comSSItaly2000
 
Thanks.

 

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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