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 everybody,
This may be a tricky one.
I would like to create a filtered table based on a table of all users (users_all). This filtering is based on a permission table that is itself filtered by Row Level Security.
The permissions tables is called `groups`, the filtered table is called `filtered_users` and the original user table is called `users_all`.
The RLS correctly filters my permission table.
I use then this syntax to filter users_all based on the values in groups[group_id]
filtered_users = CALCULATETABLE(users_all,
KEEPFILTERS( users_all[group_id] IN DISTINCT(groups[group_id]) )
)
However, although I can see that the groups[group_id] is correctly filtered in my table view, the resulting filtered table is untouched.
What am I doing wrong? Is it possible that the filtered table is generated BEFORE the RLS is applied?
Usually RLS is applied to an outer dimension in your data model and then propagates through all the way to the fact tables. No need for extra measures etc.
I agree and this is how I usually use it. I have two permissions tables that are filtered by RLS. My users_all table needs to be filtered by both of these tables to create a superset (a person has to be in one OR the other table). I cannot seem to do that with the usual relationships in the data model view. If I create the two relationships, I only retain people who exist in both tables.
I tried to calculate a combined table with my RLS tables as filters but the filters are ignored as I described.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 35 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 134 | |
| 96 | |
| 78 | |
| 67 | |
| 65 |