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
tuulia
Helper IV
Helper IV

Filter visuals and slicers via Row Level Security (Tabular)

Hi!

 

My Tabular Model use row level security and it works fine.

 

Now I want to know how to filter data of Power BI visuals based on RLS. There are lots of examples how to do this in Power BI when datasource is NOT tabular model. But how can I filter visuals and slicers based on RLS when I'm connected live to tabular model.

 

Example:

 

User 1 goes to report -> visuals shows data of organization "xxx". Organization-Slicer shows only value "xxx"

User 2 goes to report -> visuals shows data of organization "zzz". Organization-Slicer shows only value "zzz"

User 3 goes to report -> visuals shows data of organizations "zzz" and "xxx". Organization-Slicer shows values "zzz" and "xxx"

 

lookup I use is something like this and it works as it should:

 

F_SALES[organization_code] = LOOKUPVALUE(D_PERMISSIONS[organization_code],D_PERMISSIONS[user], USERNAME(),D_PERMISSIONS[organization_code],F_SALES[organization_code])

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

Hi @tuulia ,

 

If you have already configured RLS on the SSAS tabular model, next you need to use Power BI Desktop to connect to the model with live connection mode. Then create the report and publish it to the Service. 

 

Power BI uses the EffectiveUserName property to send the current Power BI user credential to the on-premises data source to run the queries. So you need to map the username in Azure AD to the Windows accounts in the D_PERMISSIONS table. Then share the report to other users.

 

For more details, please refer to:

Implement row-level security in an on-premises Analysis Services tabular model 

Manage your data source - Analysis Services 

 

image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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-kkf-msft
Community Support
Community Support

Hi @tuulia ,

 

If you have already configured RLS on the SSAS tabular model, next you need to use Power BI Desktop to connect to the model with live connection mode. Then create the report and publish it to the Service. 

 

Power BI uses the EffectiveUserName property to send the current Power BI user credential to the on-premises data source to run the queries. So you need to map the username in Azure AD to the Windows accounts in the D_PERMISSIONS table. Then share the report to other users.

 

For more details, please refer to:

Implement row-level security in an on-premises Analysis Services tabular model 

Manage your data source - Analysis Services 

 

image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

 

Hi! Thank you for your answer. This maybe the correct way to do this, but we do not use "map user name"-option

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.