Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
Hi,
I am trying to use Row Level Security for my Power Bi model and for that I am using username() function to get the filters. The thing is that I have two filters to pass and thus would like my username() function to be able to take 2 values. Is there any way of doing it ?
Solved! Go to Solution.
Not quite sure if this is what you're looking for, but I do something similar using LOOKUPVALUE. Basically I find where USERNAME() matches the Email in the Users table and then filter the Programs table where either the returned Program 1 or Program 2 match. The filters on the Programs table then flow to all the other tables in my model.
Programs
Program
Users
User 1 Email Program 1 Program 2
My RLS set up in the Programs table is:
[Program] = LOOKUPVALUE(Users[Program 1], [Email], USERNAME()) || [Program] = LOOKUPVALUE(Users[Program 2], [Email], USERNAME())
Not quite sure if this is what you're looking for, but I do something similar using LOOKUPVALUE. Basically I find where USERNAME() matches the Email in the Users table and then filter the Programs table where either the returned Program 1 or Program 2 match. The filters on the Programs table then flow to all the other tables in my model.
Programs
Program
Users
User 1 Email Program 1 Program 2
My RLS set up in the Programs table is:
[Program] = LOOKUPVALUE(Users[Program 1], [Email], USERNAME()) || [Program] = LOOKUPVALUE(Users[Program 2], [Email], USERNAME())
This solution works perfectly but I was confused on the second part "The filters on the Programs table then flow to all the other tables in my model"
I am trying to filter other tables with no user info in them but has relation to programs. And I try to filter other table based on the programs table I am not able to filter that.
This solution works perfectly but I was confused on the second part "The filters on the Programs table then flow to all the other tables in my model"
I am trying to filter other tables with no user info in them but has relation to programs. And I try to filter other table based on the programs table I am not able to filter that.
Thanks that worked perfectly.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 31 | |
| 28 | |
| 24 | |
| 23 | |
| 19 |
| User | Count |
|---|---|
| 44 | |
| 32 | |
| 18 | |
| 17 | |
| 17 |