Forum Discussion
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.
- Anonymous4 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
- FowmySuper User
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- Ivancito111Resolver I
I made a demo so that you can understand a little more what I need.
The data:
FolioStateDays
1 open 20 2 open 30 3 tracking 300 4 tracking 300 5 close 300 6 close 500 7 tracking 200 8 tracking 500 9 close 600 10 close 700 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
- AnonymousNot 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
- Ivancito111Resolver I
Thank you so much it's perfect, just what I needed ❤️