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 !
Thanks for your reply!
I have considered that option. What I want to know is if instead of using a slicer and one button I can have a button for each page (without a slicer) but only show buttons for the pages each user is allowed to see. For instances, I have 4 pages and user X does not have permission to see page 4 then he should be only given 3 buttons has navigation option (page 1,2,3).
Can you help?
Thank you.
- speedramps4 years ago
Super User
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 !
- Anonymous4 years agoNot applicable
HI filiparibeiro,
Perhaps you can take a look at the following blog to achieve show hide visual based on filter effects:
Show or Hide a Power BI Visual Based on Selection ✅ - Excelerator BI
Regards,
Xiaoxin Sheng