Guille López
Guille López

Reputation: 53

RLS - Custom "No access" message (Power BI)

Upon setting a RLS filter, users get a blank space if the info contained by the visual (drilled-down table) is not meant for them to see; however, I would like it to display a "No access" message.

I've tried setting a DAX formula upon creating the RLS role in the form of:

IF([Manager] = "John", [Sales], "No access")

But to no avail, visuals just generate an error when activating the role.

Upvotes: 0

Views: 388

Answers (1)

Sam Nseir
Sam Nseir

Reputation: 12101

You won't be able to do this within the RLS formula itself.
Instead, you could create a Measure similar to:

RLS No Access = COUNTROWS ( ALL('Your RLS Table') ) = 0

Then for example, for the Heading of your visual, you can set it to a Measure similar to:

Heading My Visual = IF([RLS No Access], "No access", "My visual heading")

Upvotes: 0

Related Questions