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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
cosminzanfir
Frequent Visitor

Measure to display data if exists or specific text if there is no value in a table visual

Hello Power BI developers.
I would need your help with the following scenario.
On one report, I am showing to the consumers where they have access by displaying their email address agains all the zones where they have access in a table visual. All this information is coming from one single table that holds the RLS setup.

 

What i want to do is to show a specific message (Contact your administrator or zone admin to grant access) in case they do not have access to any of the zone.
The issue here is that when i try to display it in a table visual, is ok until I simulate a user that does not have access.
I figured, there is something wrong with my measure.
The way i wrote the measure is:

VAR SeeZones = COUNTROWS( RLS[Zone])
VAR MyUsersZone =DISTINCT (
SELECTCOLUMNS (
FILTER (RLS,
UPPER ( RLS[emailaddress] ) = UPPER ( USERPRINCIPALNAME () )
&& SeeZones > 0),
"Zone", RLS[Zone]))

RETURN
MyUsersZone


please advice


1 REPLY 1
hnguy71
Super User
Super User

Hi @cosminzanfir 

 

Assuming you already have your RLS set up. your measure to show a specific message should be pretty simple:

VAR _HasZone = CALCULATE(COUNTROWS(RLS), NOT(ISBLANK((RLS[Zone])))) > 0
RETURN
IF( NOT(_HasZone), "Contact yourr administrator or zone admin to grant access.")

 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.