Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Color code for line chart

Hello All,

 

I am new to power Bi.

I have a line chart and I need to color the bars based on its value

But when I go to data colors I dont see condtional formatting option.
Could any one please help how to fix this


Color Condition:

KPI[value] % = SWITCH(TRUE(),
[value] <= 0.047, "Green",
[value] <= 0.067, "Green",
[value] <= 0.087, "Yellow",
[value] <= 0.107, "Red",
"Red")

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    As of now I don't think we have such a feature available to apply conditional formatting on the line color.
    However as I told you that you can convert your line chart to bar chart, apply the conditional formatting and then again turn it to a line chart.
    It will change the bar marker color.
    You can try that.

    Thanks,
    Sanket

    If this post helps, then mark it as 'Accept as Answer' and give it a thumbs up.

6 Replies

Replies have been turned off for this discussion
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous .

    Can you please confirm whether you want to conditional format the line color or bar?
    Because if you are using a Line chart, then you won't see the bars in there.

    Thanks,
    Sanket

    • Anonymous's avatar
      Anonymous
      Not applicable

      There is also one workaround which you can try.
      Create a clustered column or bar chart and apply the conditional formatting rules under column colors sections and then turn that visual to a line chart.


      Thansk,
      Sanket


      If this post helps, then mark it as 'Accept as Answer' and give it a thumbs up.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi

      Anonymous 
       

      I want to change the line color

      • Anonymous's avatar
        Anonymous
        Not applicable

        As of now I don't think we have such a feature available to apply conditional formatting on the line color.
        However as I told you that you can convert your line chart to bar chart, apply the conditional formatting and then again turn it to a line chart.
        It will change the bar marker color.
        You can try that.

        Thanks,
        Sanket

        If this post helps, then mark it as 'Accept as Answer' and give it a thumbs up.

  • PC2790's avatar
    PC2790
    Community Champion

    You can find the conditional formatting option in the "Color" section of Formatting options as below:

     

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Community Support

    Hi Anonymous ,

     

    Agree with Anonymous  suggestion.

     

    If the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


    Looking forward to your feedback.


    Best Regards,
    Henry