Forum Discussion
Graph colors
- 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
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
- Ivancito1114 years agoResolver 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