Forum Discussion
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.
- Anonymous3 years ago
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
2 Replies
- AnonymousNot 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