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

Dax to overwrite Row Level Security

Is there any Dax function to overwrite the Row Level Security ?

I want to display a messege when the RLS is activated. So I need a Dax that can funtion outside the RLS.

 

Thanks

 

Bishwa

5 REPLIES 5
selimovd
Community Champion
Community Champion

Hey @BishwaR ,

 

you can check for a value that should be there. If it's not there the row level security works, otherwise it doesn't.

For example if the user is just allowed to see his own data you can do:

Check RLS = IF( COUNTROWS(UserTable) = 1 , "Row Level Security works", "You see all data master of the universe")

 

Would that work for you?

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

I had tried that DAX but the problem is when the RLS gets activated evertying on the canvas including that DAX gets blocked. So the unauthorized views will not be able to see that message as well.

selimovd
Community Champion
Community Champion

Hey @BishwaR ,

 

why is it getting blocked?

With row level security you should in the worst case just not see any rows.

 

Can you provide a sample of the report?

 

Best regards

Denis

When I said blocked I mean not visible Sorry for the confusion

selimovd
Community Champion
Community Champion

@BishwaR that's also what I mean. With RLS you should just not get a result, but the columns should still be visible. Why are they not visible?

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors