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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
bcap01
Helper II
Helper II

Disable button if USERPRINCIPALNAME is not found in Table

Hello,

 

I am looking to make a button on my Dashboard "disabled" or change to the color gray if an Email Address cannot be found in my local table.

 

Psuedo Code is:

 

If UserEmail<>USERPRINCIPALNAME() THEN MAKE BUTTON GRAY or disabled

ELSE
MAKE BUTTON GREEN and go to URL on Click

 

Any insight of advice would be sincerely appreciated.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @bcap01,

AFAIK, the Dax expression seems not able to directly operate on the repots.

Perhaps you can refer to the following blog about setting visible about visual based on filter and modify it to hide the visual you not want to show or setting RLS filter based on your username to filter data model table records.

Show or Hide a Power BI Visual Based on Selection - Excelerator BI

Solved: RLS with UserName() - Microsoft Power BI Community

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

HI @bcap01,

AFAIK, the Dax expression seems not able to directly operate on the repots.

Perhaps you can refer to the following blog about setting visible about visual based on filter and modify it to hide the visual you not want to show or setting RLS filter based on your username to filter data model table records.

Show or Hide a Power BI Visual Based on Selection - Excelerator BI

Solved: RLS with UserName() - Microsoft Power BI Community

Regards,

Xiaoxin Sheng

bcap01
Helper II
Helper II

Hi @MAwwad, do you have any suggestions for this one?  Many thanks in advance!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors
Top Kudoed Authors