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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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