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
Anonymous
Not applicable

Shading on Y Axis

Hi,

 

I wanted to implement the a line chart with shading based on a value calculated using a measure. Refer to image below for example.

ksr_0-1632232332164.png

A line (parallel to X-Axis) will be plotted based on the value that will be dynamically calculated using a measure.

For area above the line, I intend to put red colur shading. (Just like the image shown above)

 

Any ideas if it can be implemented in Power BI? 

 

Thanks in advance!

1 ACCEPTED SOLUTION

See attached for the basic idea.  You can change the vertical limit with the slicer.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@lbendlin  Thanks for the prompt response. 

 

I have prepared a mock data below. It has population data for years 2015 to 2021 for 2 cities - A & B. I intend to plot a line chart for population across the years 2015 to 2021. The line chart plot background for population above 150 must be in red.

 

YearCityPopulation
2015A100
2016A90
2017A150
2018A130
2019A140
2020A120
2021A130
2015B120
2016B110
2017B170
2018B150
2019B160
2020B140
2021B150

 

Best regards,

ksr

See attached for the basic idea.  You can change the vertical limit with the slicer.

Anonymous
Not applicable

@lbendlin Thanks for the idea! It did not solve the issue though. But my client is satisfied with a horizontal line.

Your idea will surely be valuable for a similar requirement in the future.

Thanks again!

lbendlin
Super User
Super User

yes, that is possible. Provide some sample data and explain the measure for the constant y line(s)

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.