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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. 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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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