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

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.

Reply
JoyceW
Helper II
Helper II

Highlight values / shapes in line chart with dax.

Hi everyone,

I have a line chart with revenue per month. I want the lowest and the highest month highlighted with red for low and green for high. I used this video: https://www.youtube.com/watch?v=hmk6PxDtbNs&t=0s

 

And created this measure:

 

MaxMin Omzet =
VAR Omzet = [Omzet]
VAR MAXOmzet =
MAXX(
ALLSELECTED(Datumtabel[Jaar], Datumtabel[Maand], Datumtabel[Maandnr]),
[Omzet]
)
VAR MinOmzet =
MINX(
ALLSELECTED(Datumtabel[Jaar], Datumtabel[Maand], Datumtabel[Maandnr]),
[Omzet]
)
VAR Result =
SWITCH(
TRUE(),
[Omzet]=MAXOmzet, “Green” || [Omzet]=MinOmzet, “Red”,
“blue”
)
RETURN Result

 

The video says to turn it to a column chart and with column color select the fx next to color. then select field value and then the measure. But I cannot select the measure. I have tried setting the measure to text, but that is not an option. What am I doing wrong? 

 

 

1 REPLY 1
lbendlin
Super User
Super User

Make sure you created a measure and not a calculated column

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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