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

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

@Anonymous 

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
Greg_Deckler
Super User
Super User

You need double quotes instead of single quote

[username] = "joe"

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

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 

@Anonymous 

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

Anonymous
Not applicable

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

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.