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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Row Level security - Show report user which RLS role filters the report

Hi.

I have a report that requires the use of RLS.

Different RLS groups are assigned to the report.

E.g I have these roles:
EU <- Only data for EU countries
US <- Only data for US
Bicycle: Only data for products of type Bicycle
(+5 more roles)

I want the report to automatically show the report users which RLS role is active in filtering the report.

Similar to what is shown when "View as" a specific role:  

cosm_0-1695127367718.png

 

E.g. a user assigned to "Bicycle" role should be informed that he/she only sees products of this type
(so if the report contains a Total sales number, the user should immediately understand that this only contains Bicycle products)

Kind regards
 

3 REPLIES 3
jdbuchanan71
Super User
Super User

I don't know of any way to read the name or description of the current role that is being applied to the user, sorry.

Anonymous
Not applicable

Hi.

First of all - thanks for the reply. 
This will work as a solution in many cases.

Howevere. Do you have any ideas how to proceed if there are several filter columns?

For example, for the bicycle role, the proposed measure :

Regions = "Viewing data for: " & CONCATENATEX(VALUES('Table'[Region]),'Table'[Region],",")

will display all regions. But it should ideally show that the Product="Bicycle"

In other words, a measure or anything similar that enables to user to see his/hers active role:

Role to show user = 
// Pseudo code. 
CASE 
    WHEN ROLE IN ("EU", "US") THEN
        "Viewing data for: " & CONCATENATEX(VALUES('Table'[Region]), 'Table'[Region], ",")
    WHEN ROLE IN ("Bicycle") THEN
        "Viewing data for: " & CONCATENATEX(VALUES('Table'[Product]), 'Table'[Product], ",")
    ELSE
       "Unknown role"
END


Kind regards

jdbuchanan71
Super User
Super User

@Anonymous 

You could use a measure over the column that is being filtered by RLS to show them the selection of items they can see.  Assuming there is a column in your table call [Region] and that is where you are applying the filter, a measure like this will show them the region.

Regions = "Viewing data for: " & CONCATENATEX(VALUES('Table'[Region]),'Table'[Region],",")

jdbuchanan71_0-1695130545932.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.