Forum Discussion
charlottesmn
1 year agoFrequent Visitor
Power BI RLS with list of IDs
Hello! I have a use case where, for an embedded PowerBI report, I receive a list of IDs when calling the USERNAME() function (ie. id1,id2,id3,id4 for a user with 4 ids). A comma separates each ID. ...
lbendlin
1 year agoSuper User
PATHCONTAINS is usually fast enough. How long is your list ?
In your example you are mixing boolean and text results. Probably not what you intended?
Your entire code should be more like
PATHCONTAINS(SUBSTITUTE(USERNAME(), ",", "|"), [user_id])
charlottesmn
1 year agoFrequent Visitor
Thank you for the insight, I will try it now.
The biggest string I am getting is a list of 8 IDs, but my user table (where the RLS is applied) had almost 200,000 unique users. It is then related to my fact table with one-to-many relationships