Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
There is a User who has two roles. The access to these roles are maintained in a table which has all the dimensions as columns. For example if a User is a Geography Head, Geo_Id column will have that particular geography's code against the user.
In our scenario the user is both Geography Head and also Vertical Head, and Geography code and Vertical code are populated against the user in the table. When we do Row level security, the data is fetched as a combination of Geography and Vertical, but the user should be able to see the whole data related to the Geo or the whole data related to the vertical(based on the user's preference of looking at the report).
If the user wants to view the data as only the Geography head or the vertical head how can we achieve this?
Hi @RashmitaR,
You can use query editor to achieve your requirement.
Sample:
Then create the role level security:
Result:
Regards,
Xiaoxin Sheng
@Anonymous I will ellaborate what my issue is
I have few table two of them are :
User_access_table
user_table
These were the roles provided to me
So basicaly What I want is any user who logs into their power bi, their user id is obtained from the username() function and is matched with the user_table which is mapped to the user_access_table.
now from the user access table if there is any value in the geo_id column that means that, that paticular person is the head of that geography and if he has some value in the vertical_id column that means he is the head of that vertical.
Now i have created 3 roles geo_head,vertical head and the one who can see an intersection of both
and then after going into power bi services i can allocate each user their respective roles .
But my major concern is that this allocation to various roles is affodable only if there are lesser number of users .If there are say 500 users then manually allocating them roles in services will take huge manpower which i need to reduce any way how I can achieve this.
Hi @RashmitaR,
Sorry for slow response, you can take a look at below link about dynamic RLS:
Tutorial: Dynamic row level security with Analysis services tabular model
Regards,
Xiaoxin Sheng
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |