cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Helper III

## highlight min and max values in line chart

hello,

i want to highlight the max and mn values in the line chart

the line chart has the measure :

placed orders = CALCULATE(distinctCOUNT(orders[order_id]),USERELATIONSHIP(Calender[Date],orders[placing_date]),USERELATIONSHIP(countries[counntry_id],orders[country_id]))

note : i cant find conditional formating for the data colors

1 ACCEPTED SOLUTION
Community Support

You can try to create two measures and add them to line chart.

Like this:

``maxcount = IF ( [placed orders] = MAXX ( ALL ( orders ), [placed orders] ), [placed orders] )``
``mincount = IF ( [placed orders] = MINX ( ALL ( orders ), [placed orders] ), [placed orders] ) ``

Best Regards,
Community Support Team _ Janey

5 REPLIES 5
Super User

Hi,

Here is how to do this:

1. Create a format measure:
e.g.

Format Sales =
var _table = SUMMARIZE(all(Sales),Sales[Date],"Sum",SUM(Sales[Value]))
var maxsales = MAXX(_table,[Sum])
var minsales = MINX(_table,[Sum])
var currentS = SUM(Sales[Value])
return
switch(true(),
currentS = maxsales,"Green",
currentS =minsales, "Red",
"Blue")

2. Create a bar chart and select conditional format here:

3. Create this rule and change the chart to a line chart:

4. End result

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

Proud to be a Super User!

Helper III

how can i apply this foramting measure to my current measure as im using function (userelationship)  to filter by columns from other tables?

Super User

Hi,

You can place your current measure as the second condition of MAXX and MINXX. The idea is to compare the values on a table level and get the values we want to higlight into variables. You also need to modify the _table variable accordingly.

Proud to be a Super User!

Helper III

can you explain how to adjust the _table variable part accoording to the measure i provided? as im using mote than one single table so i cant use summarize function . also i still dont have conditional formatting for the data colors as i mentioned in the pictures i attached

Community Support

You can try to create two measures and add them to line chart.

Like this:

``maxcount = IF ( [placed orders] = MAXX ( ALL ( orders ), [placed orders] ), [placed orders] )``
``mincount = IF ( [placed orders] = MINX ( ALL ( orders ), [placed orders] ), [placed orders] ) ``

Best Regards,
Community Support Team _ Janey