Filtered data without using RLS

358 Views Asked by At

In Power BI, have two tables: one for UsersData and one for CountryData. The Username and Country columns can be identified in the UsersData table and the Country and CityName columns are in the CountryData table. The CountryData and UsersData tables are connected by using Country. Visualize the Country name and city in a table in the Power report view.

enter image description here

Requirement: When a user logs into the power bi service, he wants to see only the data related to the user. I looking for any suggestions to implement this scenario without using RLS.

1

There are 1 best solutions below

2
David Browne - Microsoft On

Without RLS you can write a measure based on the current user, eg

IsCurrentUser = if(USERPRINCIPALNAME() = SELECTEDVALUE(Users[User]),1,0)

and use that to filter a visual.

enter image description here

And the Chiclet Slicer supports "Forced Selection" so if you filter the Chicklet Slicer down to a single item, it will be automatically selected.

The tables and relationships would be set up the same way you would for RLS, eg

enter image description here