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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Aplicar formato condicional a una medida

Les comparto este archivo como ejemplo 0727_duration.pbix, otro usuario me lo compartió con anterioridad para poder usar el formato dia/hora/minuto. La columna con la medida a la que le quiero aplicar el formato condicional es esta:

 

lplat_0-1664286027060.png

El formato que le quiero aplicar es que se coloree de rojo el fondo (o en otro caso el texto) cuando el tiempo sea igual a cero. La columna central (Total Spent Display Column) muestra los mismos valores, pero no me es muy util porque esta columna no suma todos los valores al final. A esta última si es posible aplicar el formato directamente, intenté hacer una prueba usando un rango en lugar de que sea igual a cero, pero supongo que no es posible aplicarlo debido al tipo de formato de la columna

 

lplat_1-1664286379092.png

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You have to create the rules on the total time spend measure, the numeric one. Not on the text one. If needed you can use color measure using field value option

 

example

 

Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .5 , "Amber" ,
"Red "
)

 

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/1682539
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pane-66e0afcb15f3

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , You have to create the rules on the total time spend measure, the numeric one. Not on the text one. If needed you can use color measure using field value option

 

example

 

Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .5 , "Amber" ,
"Red "
)

 

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/1682539
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pane-66e0afcb15f3

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.