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

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

Reply
lawada
Helper III
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]))
lawada_0-1644144166581.png

note : i cant find conditional formating for the data colors 

lawada_1-1644144217259.png

 

1 ACCEPTED SOLUTION

Hi, @lawada 

 

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] ) 

 

 

vjaneygmsft_0-1644398827461.png

 

Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.
 
Best Regards,
Community Support Team _ Janey

 

View solution in original post

5 REPLIES 5
ValtteriN
Super User
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:
ValtteriN_0-1644150483654.png

 

3. Create this rule and change the chart to a line chart:
ValtteriN_1-1644150532831.png

4. End result

ValtteriN_2-1644150560504.png

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!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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

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.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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

Hi, @lawada 

 

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] ) 

 

 

vjaneygmsft_0-1644398827461.png

 

Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.
 
Best Regards,
Community Support Team _ Janey

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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