Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

RLS Filter - Viewing multiple text values

I am a newbie when it comes to DAX expressions and RLS. I have looked at the MSFT documentation examples and haven't quite found (as far as I can tell) what I need. I have a colum named 'Department'. In this colum are various values such as:

 

Department

-------------

HR

Finance

Accounting

Marketing

IT

Executive

 

 

I am needing to do a RLS where I just show rows that contain HR, IT, or Executive. All three of those departments aggregated into one RLS view. I can do one department on a RLS view, but I have a need for three in one view.

 

Any ideas?

 

Thank you,

 

Jim

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

You could create a measure to set a rule.

Measure =
IF ( SELECTEDVALUE ( 'Table'[Column1] ) IN { "HR", "IT", "Executive" }, 1, 0 )

Then show the data when measure = 1 in the filter pane.

1-1.PNG

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

4 REPLIES 4
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Add another email address column for the instructors in your table, then use USERNAME()/USERPRINCIPALNAME() function to implement dynamic row level security as described in the following similar blog.

https://radacad.com/dynamic-row-level-security-with-power-bi-made-simple

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Anonymous
Not applicable

@v-eachen-msft , thanks for the link. I'd rather do the filter in the DAX expression. The users will come and go, based on our current AD structure. Do you know of anyway to do the filter direct as a DAX expression?

Hi @Anonymous ,

 

You could create a measure to set a rule.

Measure =
IF ( SELECTEDVALUE ( 'Table'[Column1] ) IN { "HR", "IT", "Executive" }, 1, 0 )

Then show the data when measure = 1 in the filter pane.

1-1.PNG

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Anonymous
Not applicable

@v-eachen-msft  Thank you so much! That did the trick.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.