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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Lewisdc
New Member

RLS on two columns based on OR

Hi all - i've been searching online for most of this week to a solution but couldn't find one similar to my scenario.

 

I have two tables, Cases and Users. 

In Users, I have the email address the user will login with, including their Department.

In Cases, there are thousands of rows that include two columns, Originating Team and Resolving Team.

 

Now, I can create security roles for each Department individually using:

 

'Cases'[Originating Team] = "Department Name" || 'Cases'[Resolving Team] = "Department Name"

 

But this would mean adding hundreds of users individually to the security roles in the service.

 

Instead, I've been trying to use 'User'[User Name] = USERPRINCIPALNAME(), however, with my knowledge of DAX I can only get this to filter one of the columns (Either Originating Team or Resolving Team) based on a relationship. This removes a large number of cases that are related to their department.

 

How can I use USERPRINCIPALNAME to filter both team columns as an OR statement?

 

Thanks in advance

 

 

1 REPLY 1
Anonymous
Not applicable

Hi @Lewisdc ,

 

What about unpivoting the [Originating Team] column and the [Resolving Team] column, which makes two columns into one?

Unpivot columns (Power Query)

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.