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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-binbinyu-msft
Community Support
Community Support

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

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors