Forum Discussion
Conditional Formatting for Color in Bar Chart
Hi Anonymous
What do you want to achieve by using bar chart? Do you want to have number of product for each network and color each bar based on the network name? Can you draw your idea?
| Proud to be a Super User. If I helped, please accept the solution and give kudos! |
- Anonymous5 years agoNot applicable
Hi lkalawski,
Yes, exactly what you said. I want to draw a bar graph of number of product with color indication based on network. The amount number of product here doesn't really matter. You can put any number for each product.
- lkalawski5 years agoResident Rockstar
Anonymous
You can create a measure which will indicate which network is selected and in this measure you can assign colors for each network:
Selected Network = VAR __selectedNetwork = SELECTEDVALUE('Table'[Network]) RETURN SWITCH(__selectedNetwork, "Network A", "Red", "Network B", "Blue", "Network C", "Yellow" )and then in the settings of bar chart you can use this measure as a data colors:
The result:
Proud to be a Super User.
If I helped, please accept the solution and give kudos!
LinkedIN- Anonymous5 years agoNot applicable
Hi lkalawski ,
This looks really good. But what I want is to have the bar chart for the [Product] field. So there will be 7 bars with 3 different colors (e.g. Pencil, Book, Pen in red color).