I have a case like this
The data can also be structured like this
I would like to setup RLS that User 1 can have access to both Deparment 1 and 2 but the Lookupvalue function only supports a single value result.
What should I do? Thank you so much in advance.
Go to Solution.
You can try this:
VAR A =
VALUES ( Table[Department] ),
FILTER ( Table, Table[Username] = USERNAME () )
[Department] IN A
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
View solution in original post
Thank you very much. That works perfectly.
Hey @annguyenjoh ,
usually you would just filter the table to User = USERPRINCIPLENAME().
Then the report is filtered automatically to the departments the user has access to.
Would that work for your case?
Thank you for your reply. It didn't work as the lookup function only allow one single value as result. I actually tried this:
[Deparment] IN CALCULATETABLE (VALUES (Table1[Department]),Table1[User]=USERNAME())
Learn how to create your own user groups today!
Click here to read more about the October 2021 Release!
Check out the new Power Platform Community Connections gallery!
Mark your calendars and join us for our next Power BI Dev Camp!