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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
jovendeluna21
Helper IV
Helper IV

Conditional Page Navigation with RLS, button color should change when certain page is selected

Hello,

I just need help, I don't know why button color doesn't change when certain page is selected and when changing the roles for RLS button not changing to white those  button not viewable for specific role.

I have attached herewith the pbi file.

https://drive.google.com/file/d/1baDMJWcN8XwzD61Rx_WbkPjHqoMzAQbk/view?usp=sharing

 

Button 1 Color = SWITCH([Button 1 Destination],
SELECTEDVALUE('Page Current Selector'[Page Name]), "#2DA2BF",
BLANK(),"White",
"#B3B3B3")
 
For example 
 
button.PNG
1 ACCEPTED SOLUTION

Hi @jovendeluna21 ,

 

You need to add the correct page-level filter for each page using the Page Current Selector[Page Name] field, like this:

 

vkkfmsft_1-1642580611946.png

vkkfmsft_0-1642580565098.png

 

The result:

 

vkkfmsft_2-1642580692449.png

vkkfmsft_3-1642580705578.png

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
v-kkf-msft
Community Support
Community Support

Hi @jovendeluna21 ,

 

Because SELECTEDVALUE('Page Current Selector'[Page Name]) returns blank, so [Button 3 Destination] = SELECTEDVALUE('Page Current Selector'[Page Name]) = Blank(), the [Button 3 Color] measure returns "#2DA2BF".

 

vkkfmsft_0-1642124940332.png

 

Please try the following measures:

 

Button 1 Color = SWITCH([Button 1 Destination],
                    BLANK(),"Whiter",
                    SELECTEDVALUE('Page Current Selector'[Page Name]), "#2DA2BF",
                    "#B3B3B3")
Button 2 Color = SWITCH([Button 2 Destination],
                    BLANK(),"Whiter",
                    SELECTEDVALUE('Page Current Selector'[Page Name]), "#2DA2BF",
                    "#B3B3B3")
Button 3 Color = SWITCH([Button 3 Destination],
                    BLANK(),"Whiter",
                    SELECTEDVALUE('Page Current Selector'[Page Name]), "#2DA2BF",
                    "#B3B3B3")
Button 4 Color = SWITCH([Button 4 Destination],
                    BLANK(),"Whiter",
                    SELECTEDVALUE('Page Current Selector'[Page Name]), "#2DA2BF",
                    "#B3B3B3")
Button 5 Color = SWITCH([Button 5 Destination],
                    BLANK(),"Whiter",
                    SELECTEDVALUE('Page Current Selector'[Page Name]), "#2DA2BF",
                    "#B3B3B3")

vkkfmsft_1-1642125305833.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you very much @v-kkf-msft! However I want also the button of the current page selection to be in blue color. For example if you are viewing Automation Solutions, the button Automation Solutions will be blue and the homepage is gray, but if you switch to Homepage, the Homepage button will be blue and Automation Solutions will be in gray.

Hi @jovendeluna21 ,

 

You need to add the correct page-level filter for each page using the Page Current Selector[Page Name] field, like this:

 

vkkfmsft_1-1642580611946.png

vkkfmsft_0-1642580565098.png

 

The result:

 

vkkfmsft_2-1642580692449.png

vkkfmsft_3-1642580705578.png

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Oh that's simple as it is. Great! Thanks for your help @v-kkf-msft !!!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors