Forum Discussion

Ivancito111's avatar
Ivancito111
Resolver I
4 years ago
Solved

Graph colors

Hello, hoping you are well, I have a query to ask you.

To contextualize them I can tell you that this data are problems that occur in the processes that the company has and this is where they are "solved", each of these problems have maximum days to solve up to a certain stage and the last stage is to follow up that the solution works correctly.

 

To make it shorter I have this chart:

 

Here we can see that at this moment there are about 6 problems that are being solved, but only the first 3 are in Follow-up, and I would like them to be identified since in the follow-up it does not matter the days but still you want to see the days.

 

My idea is that they have a different color, that is to say, that the ones that are in follow-up are identified in this way.

I have not found the way to be able to do that, I have the status. But in conditional color it only allows me to play with numbers but it is not as if I could say that the ones with status 1 are green.

 

If you could help me with this it would help me a lot. Thank you very much.

 

Thanks a lot,
Ivancito.

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Ivancito111 

    I created a sample with the data you provided .

    (1)If you want use color to display the State , you need create a column to define the color of State .

    Color = SWITCH(TRUE(),'Table'[State]="open","green",'Table'[State]="tracking","orange")

    (2)Put the calculated column in table visual , you can see the result .

    (3)Then apply the calculated column in Clustered bar chart .Choose the Default color in visual format settings , select Field value in Format style ,Color in What field should we based this on .

    The fianl result is as shown :

    I have attached my pbix file ,you can refer to it .

     

    Best Regard

    Community Support Team _ Ailsa Tao

4 Replies

  • Ivancito111 

    Sorry, understanding your question was a bit tough for me. If you need to apply a logic other than specifying a number for conditional formatting, you use measures that define the logic. Please refer to these articles and there are tons of videos to learn how to do it.

    https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting
    https://www.youtube.com/watch?v=y1632Km1a2Y
    https://www.bluegranite.com/blog/controlling-conditional-formatting-using-dax


     

    • Ivancito111's avatar
      Ivancito111
      Resolver I

      I made a demo so that you can understand a little more what I need.

       

      The data:

      FolioStateDays

      1open20
      2open30
      3tracking300
      4tracking300
      5close300
      6close500
      7tracking200
      8tracking500
      9close600
      10close700

       

      The graph:

       

      As you can see, the graph only shows the open and tracking sheets, what I need is that the ones that are in tracking are shown in one color and the ones that are open are shown in another color.

       

      What you sent me works, but it validates me with expressions of numbers, at no time allow me to enter a state or if it is equal to a number it is of a color.

      Thank you.

       

      Thanks,
      Ivancito

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Ivancito111 

    I created a sample with the data you provided .

    (1)If you want use color to display the State , you need create a column to define the color of State .

    Color = SWITCH(TRUE(),'Table'[State]="open","green",'Table'[State]="tracking","orange")

    (2)Put the calculated column in table visual , you can see the result .

    (3)Then apply the calculated column in Clustered bar chart .Choose the Default color in visual format settings , select Field value in Format style ,Color in What field should we based this on .

    The fianl result is as shown :

    I have attached my pbix file ,you can refer to it .

     

    Best Regard

    Community Support Team _ Ailsa Tao

    • Ivancito111's avatar
      Ivancito111
      Resolver I

      Thank you so much it's perfect, just what I needed ❤️