Forum Discussion
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.
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!
See attached for the basic idea. You can change the vertical limit with the slicer.
4 Replies
- lbendlin
Super User
yes, that is possible. Provide some sample data and explain the measure for the constant y line(s)
- AnonymousNot 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.
Year City Population 2015 A 100 2016 A 90 2017 A 150 2018 A 130 2019 A 140 2020 A 120 2021 A 130 2015 B 120 2016 B 110 2017 B 170 2018 B 150 2019 B 160 2020 B 140 2021 B 150 Best regards,
ksr
- lbendlin
Super User
See attached for the basic idea. You can change the vertical limit with the slicer.
- AnonymousNot 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!