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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
mchercol
Helper I
Helper I

Cambiar elcolor del boton(II)

Hola buenos dias, continuando con el problema del cambio de color de los botones. Quizas a alguiense le ocurra una idea que pueda realizar la siguiente funcion.

 

Tengo un boton:

mchercol_0-1701685722943.png

Al pulsarlo abre un desplegable:

mchercol_1-1701686030255.png

Que contiene dos slicer para filtrar los años y los meses.

 

Pues bien, me gustaria que el boton que hace que se abra el desplegable, cambiara de color si en alguno o en los dos slicer que contiene el desplegable hubuera algo seleccionado.

 

Se os ocurre comoo poderlo hacer?

 

Gracias a todos por adelantado

Un saludo

 

 

1 ACCEPTED SOLUTION

Hi @mchercol 

You can refer to the following solution.

I create a table to set it as a slicer.

vxinruzhumsft_0-1701936559764.png

Then create a measure

Measure = IF(ISFILTERED('Slicer'[Value]),"red","white")

Put it to the condition of the button fill

vxinruzhumsft_1-1701936707264.png

vxinruzhumsft_2-1701936727059.png

Output:If the slicer is not filtered, the button will be white, or it will be red.

vxinruzhumsft_4-1701936758335.png

 

vxinruzhumsft_3-1701936745147.png

Best Regards!

Yolo Zhu

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

3 REPLIES 3
amitchandak
Super User
Super User

@mchercol , I doubt standard visual can do that. Using a bookmark you can hide/show but for that, you need to have a button for each year. 

 

You can explore need button slicer if it can do better job

https://powerbi.microsoft.com/en-us/blog/new-slicer-button-public-preview/

 

Bookmarks https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive
https://docs.microsoft.com/en-us/power-bi/desktop-bookmarks

 

Quizas no me explique muy bien lo que quisiera conseguir.

Lo que necesitaria conseguir es que si alguno de los segmentadores tiene algo selaccionad ( año o mes) es Botón que abre el menú

 

mchercol_0-1701761417618.png

pudiera cambiar de color, así indicaría que hay algo seleccionado.

 

Gracias

Hi @mchercol 

You can refer to the following solution.

I create a table to set it as a slicer.

vxinruzhumsft_0-1701936559764.png

Then create a measure

Measure = IF(ISFILTERED('Slicer'[Value]),"red","white")

Put it to the condition of the button fill

vxinruzhumsft_1-1701936707264.png

vxinruzhumsft_2-1701936727059.png

Output:If the slicer is not filtered, the button will be white, or it will be red.

vxinruzhumsft_4-1701936758335.png

 

vxinruzhumsft_3-1701936745147.png

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

 

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.