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
PBInewbee123
Frequent Visitor

How to let a visual not being affected by RLS

Hi,

 

I am creating a dashboard where I want to show parent materials, with all their child materials (mat nr, qty, ...). I also want to show the nr of pieces on stock at the central warehouse, but also locally.

This means that a certain location should see all child materials, whether or not they have local stock of that child material, but only their own stock and not that of any other location (except for the central warehouse).

This is part of a much bigger report, for which RLS is set up, based on the location of the users.

Issue that I am having now is that from the moment a user wants to check this, they only see the child materials that are on their stock, and not the others anymore, due to the RLS. Any idea how to solve this?

I thought about creating 2 visuals: 1 showing all information except local stock level, and a second one, showing only the child material and the stock level, but also then, the RLS will filter the first visual. Any ideas?

 

Thanks

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

Hi @PBInewbee123 ,

 

Thanks @amitchandak  for the quick reply and solution. Here are some of my additions.

1.This is my test data.

vtangjiemsft_0-1709796473350.png

2.We can create a table.

Table 2 = SUMMARIZE('Table','Table'[user],"Remaining stock",CALCULATE(SUM('Table'[stock]),ALL('Table'))-SUM('Table'[stock]))

3.We can create RLS.

vtangjiemsft_1-1709796532428.pngvtangjiemsft_2-1709796544269.png

4.Then the result is as follows.

vtangjiemsft_3-1709796584883.pngvtangjiemsft_4-1709796600008.pngvtangjiemsft_5-1709796616110.png

Best Regards,

Neeko Tang

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

2 REPLIES 2
v-tangjie-msft
Community Support
Community Support

Hi @PBInewbee123 ,

 

Thanks @amitchandak  for the quick reply and solution. Here are some of my additions.

1.This is my test data.

vtangjiemsft_0-1709796473350.png

2.We can create a table.

Table 2 = SUMMARIZE('Table','Table'[user],"Remaining stock",CALCULATE(SUM('Table'[stock]),ALL('Table'))-SUM('Table'[stock]))

3.We can create RLS.

vtangjiemsft_1-1709796532428.pngvtangjiemsft_2-1709796544269.png

4.Then the result is as follows.

vtangjiemsft_3-1709796584883.pngvtangjiemsft_4-1709796600008.pngvtangjiemsft_5-1709796616110.png

Best Regards,

Neeko Tang

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

amitchandak
Super User
Super User

@PBInewbee123 , You need to have a table (may be aggregated), where the RLS filter does not apply.

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.