Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Quiero poder usar formato condicional (color de celda) para mostrar el mes Max y Min en una descripción emergente.
El problema que tengo es que la medición actual no funciona porque muestra febrero y marzo (mis datos no se han actualizado desde enero) como MIN; no hay datos disponibles para estos meses.
Fig.1
Tengo estos 3 elementos en mi panel de Visualizaciones:
Fig.2.
# =
COUNT('Cases'[PrimaryTopic2])
Mth = es el campo del mes del año fiscal de mi calendario
MinMax Tooltip =
VAR AllTopics =
CALCULATETABLE (
ADDCOLUMNS ( VALUES ( 'Cases'[PrimaryTopic2] ), "Value", [Primary Topics] ),
ALLSELECTED ( 'Cases'[PrimaryTopic2] )
)
VAR NonBlankValues =
FILTER ( AllTopics, NOT ISBLANK ( [Value] ) )
VAR MinValue =
MINX ( NonBlankValues, [Value] )
VAR MaxValue =
MAXX ( NonBlankValues, [Value] )
VAR CurrentValue = [Primary Topics]
RETURN
SWITCH (
TRUE (),
CurrentValue = MinValue, "MIN",
CurrentValue = MaxValue, "MAX",
BLANK ()
)Ya he recibido algo de ayuda para llegar a este punto, así que quiero saber si esto siquiera es posible.
Desafortunadamente, no puedo compartir el pbix por seguridad de los datos.
La imagen de la Matriz que requiere la descripción emergente de MaxMin está abajo; cuando coloco el cursor sobre la línea de chispa veo la Fig.1.
Esos rotuladores azules son geniales, pero no está claro en qué meses son, por eso la descripción emergente.
Cualquier ayuda sería muy apreciada.
Hola,
Creo que puedes solucionarlo al reducir el rango considerando el formato condicional, puedes cambiar tu DAX a esto:
MinMax Tooltip =
VAR LastMonthWithData =
CALCULATE(
MAX('Calendar'[Month]),
FILTER(
ALL('Calendar'),
NOT ISBLANK([#])
)
)
VAR ValidMonths =
FILTER(
ALLSELECTED('Calendar'),
'Calendar'[Month] <= LastMonthWithData
&& NOT ISBLANK([#])
)
VAR MinValue =
MINX(ValidMonths, [#])
VAR MaxValue =
MAXX(ValidMonths, [#])
VAR CurrentValue = [#]
RETURN
SWITCH(
TRUE(),
CurrentValue = MinValue, "MIN",
CurrentValue = MaxValue, "MAX",
BLANK()
)
Gracias,
Daniele
Gracias Daniele, probé tu código y eliminó los 2 meses futuros pero no hay Max ni Min:
MinMax Tooltip2 =
VAR LastMonthWithData =
CALCULATE(
MAX(Date2[Mth]),
FILTER(
ALL(Date2),
NOT ISBLANK([#])
)
)
VAR ValidMonths =
FILTER(
ALLSELECTED(Date2),
Date2[Mth] <= LastMonthWithData
&& NOT ISBLANK([#])
)
VAR MinValue =
MINX(ValidMonths,[#])
VAR MaxValue =
MAXX(ValidMonths, [#])
VAR CurrentValue = [#]
RETURN
SWITCH(
TRUE(),
CurrentValue = MinValue, "Min",
CurrentValue = MaxValue, "Max",
BLANK()
)
Otra cosa, cuando uso DAX Formatter en el código, me aparece el siguiente error en el MinValue:
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.