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
Estoy intentando aplicar color de fondo en una matriz que contiene una columna "Distribución %":
Quiero realizar un cálculo y establecer el color bg ro rojo. La calcuación es:
% > (TMo Target + Over Varaince) O
% < (objetivo TMo + bajo varianza),
Establecer "Rojo"
Para esto escribí una medida (probando diferentes maneras):
Measure =
/*
SWITCH(
TRUE(),
//([% of MB by Total MB all PMN] > SUMX(OutboundVolumes, OutboundVolumes[Standard Target Display] + OutboundVolumes[Standard Over Variance Numeric]) ), "Red"
([% of MB by Total MB all PMN] > SUMX(OutboundVolumes, OutboundVolumes[OverTargetValue] + 0 ) ), "Green",
([% of MB by Total MB all PMN] < SUMX(OutboundVolumes, OutboundVolumes[UnderTargetValue] + 0) ), "Red"
//([% of MB by Total MB all PMN] < SUMX(OutboundVolumes, OutboundVolumes[Standard Target Display] + OutboundVolumes[Standard Under Variance Numeric]) ), "Red"
)
*/
VAR distriPerc = VALUE('OutboundVolumes'[% of MB by Total MB all PMN])
RETURN
IF ( distriPerc > (SUMX(OutboundVolumes, OutboundVolumes[Standard Target Display] + OutboundVolumes[Standard Over Variance Numeric]) ) ||
distriPerc < (SUMX(OutboundVolumes, OutboundVolumes[Standard Target Display] + OutboundVolumes[Standard Under Variance Numeric]) ),
"Red" )
/*
IF ([% of MB by Total MB all PMN] > SUMX(OutboundVolumes, OutboundVolumes[Standard Target Display] + OutboundVolumes[Standard Over Variance Numeric] ),
"Red",
IF ([% of MB by Total MB all PMN] < SUMX(OutboundVolumes, OutboundVolumes[Standard Target Display] + OutboundVolumes[Standard Under Variance Numeric]),
"Red", "Pink")
)
*/
//||
// ,))))
Con los resultados anteriores,
% Objetivo + Sobre Objetivo + Bajo
28 (5 + 10 = 15) ( 5 + -10 = -5) 28 > 15 - sin embargo, no se vuelve rojo.
72 (95 + 5 = 100) (95 + -1 = 85) 72 < 85 - Se vuelve rojo
El calc de varianza Target + Over de alguna manera no funciona.
Los datos de los resultados anteriores se ven como los siguientes (todos los campos son de tipo %)
Los valores del campo Sobre varianza son:
Necesito ayuda para averiguar por qué el calc Target + Over no funciona. Cualquier ayuda es apreciada.
Gracias
@td_beginner , Pruebe una medida como esta y úselo en formato condicional usando la opción de valor de campo
If( [Distribución %] >[Tmo Target] + [Sobre Varianza] , "Rojo", "Blanco")
Gracias por su respuesta @amitchandak
Escribí una medida como usted dijo:
OnlyOver_Measure = IF ([% of MB by Total MB all PMN] > SUMX(OutboundVolumes, [Standard Target Display] + [Standard Over Variance Numeric]) , "Red", "Green" )
Y el resultado es que el % de distribución se muestra como verde en lugar de rojo.
Los cols % de distribución y objetivo de TMo en la matriz son medidas que devuelven valores de % y texto respectivamente. Los cols Over Variance & Under Variance contienen valores de campos de tipo Text- los datos originales.
Para trabajar en las calcuaciones, he duplicado los campos y hecho de tipo %.
Para depurar el problema anterior, agregué esos campos de % creados en Matrix, y veo valores diferentes a los que hay en los datos, se muestran como Suma y no solo como valor.
¿Podría ser este el problema ??? Pero entonces, ¿cómo es que el col bajo Varianza % está funcionando perfectamente bien?
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 |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |