Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Dynamic Security in RLS - Collection of Filters passeed as Username

Hi

 

My issue is with Dynamic Security RLS I am following the article here - https://learn.microsoft.com/en-us/power-bi/developer/embedded/cloud-rls

 

I need to filter the username, ultimately, as a collection of groups but primarily as onegroup and I need to return rows that our geographic_description “startswith” so if a passed username is ABC rows with a “geographic_description” of “abc” and “abcfg” and “abchgs” would all be returned.

 

This is achieved with  the following code

  • LEFT (CustomerVehicle[geographic_description], LEN ( username() ) ) = username()

 

 

What I am trying to achieve is sending through multiple “Business Groups” as filters for the “geographic_descriptions” in the username as a csv string – e.g username() = “abc,xyz,def” as all to be used in a Startswith scenario.


My issue is with creating a collection of filters from the csv of Business Groups and returning the row if the “Geographic_Description starts with ANY of the passed filters “Business Groups

1 Reply