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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Manage Roles - DAX version of NOT IN

Hello

I have a table CostReport_Layout and within there is a column bud2_line .  I want to restrict users so they cant see the bud2_lines that relate to Salary information.

[bud2_line] <> {"Salaries"}   but for multiple values none of the below work.  How would you do this

[bud2_line] <> {"Salaries", "Social security, pension and medical"}

[bud2_line] not in {"Salaries", "Social security, pension and medical"}

[bud2_line] not {"Salaries", "Social security, pension and medical"}

 

Thanks

Paul

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

not [bud2_line] in {"Salaries", "Social security, pension and medical"}

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

Please try below steps:
1. below is my test table

Table:

vbinbinyumsft_0-1673922013291.png

2. add a table visual with field

vbinbinyumsft_1-1673922048972.png

3. create a role with below dax formula

not( [bud2_line]) in {"Salaries", "Social security, pension and medical"}

vbinbinyumsft_2-1673922094353.png

3. view as new role

vbinbinyumsft_3-1673922139227.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Many thanks for your help - that works

Anonymous
Not applicable

Hi @Anonymous ,

Thanks for your feedback.

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

 

Best regards,
Community Support Team_Binbin Yu

johnt75
Super User
Super User

not [bud2_line] in {"Salaries", "Social security, pension and medical"}

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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