cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

dax filter help for role

I have a table with 3 records, I just want to apply a role which filters data only to username Joe (from table)

 

so i am giving below dax ...what is the error here and horls.JPGw to fix it. Please advise 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: dax filter help for role

@Powerbi_astra 

You just need to add joe's power bi account to the RLS group.

rls-security.png

then share the report to him with share button OR add him to the workspace as a Viewer (other roles are not restricted by RLS).

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

5 REPLIES 5
Highlighted
Super User IV
Super User IV

Re: dax filter help for role

Highlighted
Helper IV
Helper IV

Re: dax filter help for role

ok, so the syntax is "joe"...able to create role

 

however, when I publish the report, how can I apply this role to the data ? I see all 3 records, my goal is to see just the row that has Joe

Highlighted
Super User IV
Super User IV

Re: dax filter help for role

You need double quotes instead of single quote

[username] = "joe"

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Helper IV
Helper IV

Re: dax filter help for role

yes that works, and in desktop, when i say view as "test-role", i get rows filtered accordingly (only see Joe info)

 

how to make this happen in the power bi service ? i mean i want to share this report to joe where he sees only joe's data in pbi service 

Highlighted
Microsoft
Microsoft

Re: dax filter help for role

@Powerbi_astra 

You just need to add joe's power bi account to the RLS group.

rls-security.png

then share the report to him with share button OR add him to the workspace as a Viewer (other roles are not restricted by RLS).

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Top Solution Authors
Top Kudoed Authors