Forum Discussion

KilJhard's avatar
KilJhard
Frequent Visitor
3 years ago
Solved

Single Line Chart with multiple Colours

Hello all and HAPPY FRIDAY!!!   I'm trying to create a line chart with a single line that has multiple colours to it.  Ie.  If the line goes up, its red, line goes down, its green, flat lined, yell...
  • v-yueyunzh-msft's avatar
    3 years ago

    Hi , KilJhard 

    According to my research and testing, there is currently no official visual that supports dividing a line into multiple colors in a line chart in different situations, but as far as I know, the color of the data label corresponding to each line chart's data point is variable, you can simply refer to this example demo: you can first use your line according to your needs Write a measure in the context of the chart grouping to define the corresponding color for each data point, and then create a simple column chart:

    Then under Data colors, set up conditional formatting on the bars:

    The result is like this:

    Now switch the visual to a line chart.

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly