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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
filiparibeiro
Helper III
Helper III

Buttons Conditional Format - Hide buttons based on RLS

Hello.

I'd like to know if there's any way to hide buttons that users should not have access to when navigating the report (based on Row Level Security), i.e., for each user it should only be visible buttons corresponding to the pages they are allowed to navigate to, the other ones should disappear.

Thanks in advance!

1 ACCEPTED SOLUTION

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:-

speedramps_1-1659117159891.png

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 page

speedramps_3-1659117496458.png

 

6) = 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 colour

speedramps_4-1659117780836.png

 

7) Create row level security for each role

speedramps_2-1659117378300.png

 

😎 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 !

View solution in original post

4 REPLIES 4
filiparibeiro
Helper III
Helper III

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.

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:-

speedramps_1-1659117159891.png

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 page

speedramps_3-1659117496458.png

 

6) = 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 colour

speedramps_4-1659117780836.png

 

7) Create row level security for each role

speedramps_2-1659117378300.png

 

😎 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 !

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
speedramps
Super User
Super User

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 

 

speedramps_0-1658774835624.png

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 ! 😀

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.