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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Shahabh786
Frequent Visitor

Adding Max and Min Growth Lines to Line Chart with Dynamic Measures

Hi Power BI Community,

 

I’ve created a line chart that dynamically switches between different growth metrics for Sales Units and Sales Price. I’ve implemented this using calculation groups, and it’s working great.

 

Here’s how it’s set up:
I have two slicers/buttons:

  • Measure Selector: Allows switching between Sales Units and Sales Price.
  • Growth Metric Selector: Allows switching between Monthly Growth, Year-over-Year (YoY) Growth, and MAT Year-over-MAT Year Growth.

 

When I select a measure (either Units or Sales Price), the line chart below updates to reflect the selected growth metric (Monthly, YoY, or MAT growth) for the chosen measure. Both slicers/buttons are aligned, ensuring the chart displays the correct data based on the selected options.

 

Issue:
I would like to enhance the chart by adding two additional lines that highlight the maximum and minimum growth values for the selected metrics. These lines should dynamically update based on the current measure (Units or Sale Price) and the selected growth metric (Monthly, YoY, or MAT Growth).

 

Additional Information:

I'll be providing the link of PBIX file which I've created using the Contoso Sales Data sample. On the first page, I’m showcasing what I’ve achieved so far with dynamic measure selection. On the second page, I’m illustrating what I’m aiming to accomplish—specifically, displaying monthly growth with the highest and lowest values highlighted.

 

I’m looking for guidance on how to achieve this within Power BI. Any suggestions or step-by-step instructions would be greatly appreciated!

Download the PBIX File here !

 

Thank you in advance!

4 REPLIES 4
mianjalil239
Helper III
Helper III

I need a help in Chart please !

Greg_Deckler
Community Champion
Community Champion

@Shahabh786 Have you looked at the Analytics pane?

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler 

 

Thanks for the suggestion!

 

Yes, I’ve explored the Analytics pane, but the challenge I encountered is that it provides a straight line for the max and min values. What I’m aiming for is to highlight the specific months or years where these max and min growth values occur with two distinct points, rather than a continuous line.

To achieve this, I believe using a measure would be more flexible. This way, I can dynamically calculate and display the min and max values for the selected metrics, and also apply additional insights if needed in the future. This approach would give me more control over the visualization, allowing the chart to reflect these values accurately in the context of the selected growth metric and measure.

 

Would appreciate any guidance on how to create such measures or if you have any other suggestions!

 

Thanks again for your help!

@Shahabh786 Well, in that case you could have the measure return a value for the min/max and blank for everything else and then perhaps turn on a marker for that line series. I didn't download your PBIX file but you could do something like this:

 

Min Measure = 
  VAR __Measure = [Original Measure]
  VAR __Table = SUMMARIZE( ALL('Table'), [Year], [Month], "__Value", [Original Measure] )
  VAR __Min = MINX( __Table, [__Value] )
  VAR __Result = IF( __Measure = __Min, __Measure, BLANK() )
RETURN
  __Result

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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