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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

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