Forum Discussion

draxicle1's avatar
draxicle1
Icon for Helper I rankHelper I
2 years ago

Graph visual that shows a highest value achieved line across all legends.

Hello!

Please can I pick your brains.

I have a line chart visual in Power BI desktop.

On the X-axis, is a specialised industry period linked to a calendar table. On the Y-axis is a sum of an industry metric (somewhat like mean time between failure, but using distance instead of time). The legend has different classes of item. The multiple lines meander and cross paths as you would expect across all the different classes. The graph works fine, and I have a slicer that can pick out our specific company's items, among all of the industry.

 

I now have a requirement to show a line that has the highest industry metric, at any given period, across all classes AND regardless of the filters applied. The purpose is so that we can have the graph filtered for our company's class, but still have an indication of the best industry achiever with the new line.

I have tried this the following way, but with no success.

I created a measure:

 

Maximum Industry Metric =
CALCULATE(
    MAX('Combined Data'[Industry_Metric]),
    ALL('Combined Data')
)
Then I thought I would simply be able to drop the measure in the secondary y-axis. However Power BI Visualisation line chart will not accept the measure and display it along side the other classes. 
Can anyone think of another way to show this line? Or where I've gone wrong?
 
I have attached an illustration below of what I want it to look like in the yellow highlighted line. Note the yellow highlighted line jumps from red to blue, because that is the highest at that point.
 
  lines.
 
Thanks!

2 Replies

  • Wilson_'s avatar
    Wilson_
    Icon for Memorable Member rankMemorable Member

    draxicle1,

     

    Can you please share a sample pbix file? (If you don't know how, please check the pinned thread in the forum.) It would make debugging your issue easier. 🙂

     

    There's no context at all on your data model, what field/measure you're showing in the line chart, etc.

    • draxicle1's avatar
      draxicle1
      Icon for Helper I rankHelper I

      Hi Wilson_ 

      I have attached some screen shots. As this is work information, I can't really share the model or data.

      I hope this gives you some sense about what I am working with.

       Model"Combined Data" Table - "Mp701D" Column"Combined Data" Table - "Full Format Period"" ColumnLine graph and axis attributes