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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Syndicate_Admin
Administrator
Administrator

Medida del código de color para toda la tabla

Hola a todos, tengo una tabla que se ve así, con muchas columnas irrelevantes entre Team y ExceedededGoalBy. Quiero codificar por colores cada fila en función de un cálculo de la columna ExceededGoalBy. ¿Cómo escribiría una medida que pueda usar para el valor de campo en el formato condicional con la siguiente lógica: si ExceedededGoal <0, use el color rojo? De lo contrario, si > = 0 y <5, use el color amarillo, de lo contrario, si > = 5, use el verde. ¿Puede ayudarme de alguna manera a averiguar cómo escribir esta medida DAX?

EquipoRandomColumn1RandomColumn2

ExceedededGoalBy

1aHectogramo5
2bd12
3de0
4fu2
5er7
1 REPLY 1
Syndicate_Admin
Administrator
Administrator

@jake4001 esta medida de color:

Color Measure = 
VAR __Exceeded = SELECTEDVALUE ( Table[Exceeded Goal By] )
RETURN
SWITCH ( TRUE (),
    __Exceeded >= 5, "Green",
    __Exceeded >= 0, "Yellow",
    "Red"
)

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.