Forum Discussion
Buttons Conditional Format - Hide buttons based on RLS
- 4 years ago
Hi again filiparibeiro
Try this solution
Click here to download an example
1) Create 3 report pages called Menu page, Page1 and Page2 .
2) Hide Page1 and Page2
3) Crarete security table:-
4) Create these DAX measure
Button1 page = CALCULATE( MIN(Security[Page access]), Security[Page access] = "Page1")Button2 page = CALCULATE( MIN(Security[Page access]), Security[Page access] = "Page2")
Button1 colour = IF(CALCULATE(ISEMPTY(Security),Security[Page access] = "Page1"),"Grey","Green")
Button2 colour = IF(CALCULATE(ISEMPTY(Security),Security[Page access] = "Page2"),"Grey","Green")
5) = Configure button actions
Set action for Button1 = Page Navidation, Desinatiin FX = Field values = Button1 page
Set action for Button2 = Page Navidation, Desinatiin FX = Field values = Button2 page6) = Configure button colours.
Click on button1 / format / Style / Fill / Colour fx = Field value = Button1 colour
Click on button2 / format / Style / Fill / Colour fx = Field value = Button2 colour7) Create row level security for each role
😎 Test the Menu page by clicking on Modelling / View as
- View as Customer = Green button 1 and button 2 grey and disabled
- View as Supplier = Green button 2 and button 1 grey and disabled
- View as Manager = Button 1 and button 2 green
Thanks for reaching out for help.
I have helped you, now please help me by giving kudos.
Remeber we are unpaid volunteers and here to coach you with Power BI and DAX skills, not do users job for them !
So please click the thumbs up and accept as solution button.
One question per ticket please. If you need to extend your request then please raise a new ticket.
You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !
Try this ...
Create a report and give the pages any names for example Menu, Page1, Page2 or Page3
Hide Page1, Page2 or Page3
Create a table with pagename and securitygroup for example
Page 1, Customer
Page 2, Supplier
Page 3, Customer
Page, 3, Supplier
Now add row level securtity Customer and Supplier
On the menu page add slicer for pagename.
Note this wil use row level security.
On the menu page add button with these options ...
Blank
Action = on
Type = Page navigation
Destination = fx
Field value
Base on = Pagename
Congratulations ...
the menu page ofshoudl now have a row level security menu to page1, page2 and page3
Thanks for reaching out for help.
I put in a lot of effort to helped you, now please quickly help me by giving kudos.
Remeber we are unpaid volunteers and here to coach you with Power BI and DAX skills and ttechniques, not do the users job for them !
So plaase click the thumbs up and accept as solution button.
One question per ticket please. If you need to extend your request then please raise a new ticket.
You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you ! 😀