Highlight Max & Min Bar in Visual with Different Color in POWER BI using an Explicit Measure DAX

Опубликовано: 30 Сентябрь 2024
на канале: Rahim Zulfiqar Ali
1,104
16

Highlight the Max & Min Bar in the Visual with Different Color in Microsoft #POWERBI Desktop using an Explicit Measure #DAX

Max_Min Color =
VAR ProductContainer =
ALLSELECTED ( Orders[Product Container] )
VAR GetMaxValue =
MAXX (
ProductContainer,
CALCULATE (
[Total Orders $]
)
)
VAR GetMinValue =
MINX (
ProductContainer,
CALCULATE (
[Total Orders $]
)
)
RETURN
IF (
SUM ( Orders[Order Amount] ) = GetMaxValue,
"#00b300",
IF (
SUM ( Orders[Order Amount] ) = GetMinValue,
"#ff0000",
"#D9B300"
)
)