Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hola
Tengo la siguiente medida:
Total SA WIP > 2 days =
CALCULATE(COUNTROWS('Service Appointment'),
'Service Appointment'[IsWIP]=1,
'Service Appointment'[WIP Days] >2)
Lo que se ve así cuando se agrega a mi matriz:
Tengo el requisito de aplicar el formato condicional, pero. el umbral de rag cambiará dependiendo de la región.
Para todas las regiones excepto NAM, los grupos de trapos serán '> 50' (rojo), '10 - 50' (ámbar) y '< 10' (verde)
Para NAM, los grupos de trapos serán '> 150' (rojo), '30 - 150' (ámbar) y '< 30' (verde)
¿Cómo puedo lograrlo?
Por si acaso alguien está interesado, aquí está la medida terminada:
Colour =
IF (
FIRSTNONBLANK ( Location[Region], "NA" ) = "NAM",
SWITCH (
TRUE (),
'Key Measures'[Total SA WIP > 2 days] < 30, "lightgreen",
'Key Measures'[Total SA WIP > 2 days] <= 150, "orange",
"red"
),
SWITCH (
TRUE (),
'Key Measures'[Total SA WIP > 2 days] < 10, "lightgreen",
'Key Measures'[Total SA WIP > 2 days] <= 50, "orange",
"red"
)
)
@JimJim , Crear una medida de color como el ejemplo dado y utilizarla en formato condicional con la opción de valor de campo
Color, ¿cuál es el color?
interruptor (true(),
FIRSTNONBLANK('Table'[commodity],"NA") en "commodity1" && sum('Table'[Value]) >500,"lightgreen",
FIRSTNONBLANK('Table'[commodity],"NA") en "commodity2" && sum('Table'[Value]) >1000,"lightgreen",
Añadir más condiciones
"Buen hotel"
)
referencia: https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
Hola @amitchandak ,
Estoy tratando de que su solución funcione:
He creado la medida liko así:
color =
switch ( true(),
FIRSTNONBLANK(Location[Region],"NA") = "NAM" && 'Key Measures'[Total SA WIP > 2 days] < 30,"green",
FIRSTNONBLANK(Location[Region],"NA") <> "NAM" && 'Key Measures'[Total SA WIP > 2 days] < 10,"green",
// Add more conditions
"red"
)
Cuando voy al formato condicional para las columnas, no puedo formatear en función del color, ya que la medida 'color' está atenuada
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |