Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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!

4 Replies

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

  • Anonymous's avatar
    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

      • Anonymous's avatar
        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!