Forum Discussion
Multiple stacked column chart
Hey Anonymous ,
you can control the fill color of a column/bar by using conditional formatting.
To change the color of the columns from this:
to this
I created this measure:
Measure 2 =
var _category = MAX('Dimension Customer'[Category])
var fillColor = IF(_category = "N/A" , "red" , "#808782")
return
fillColor
What the measure does is this:
It reads the current value of the column Category by using the MAX(...) function. The column is used as inner axis-label.
If the current value equals "N/A" then the color "red" should be used, otherwise a hexcode.
I applied the measure for the conditional formatting by changing the data colors option of the chart:
Hopefully, this provides what you are looking for.
Regards,
Tom
- TomMartens6 years agoSuper User
Hey Anonymous ,
you can't use the measure as legend or axis.
You have to change the Data colors formatting option of the chart, see the screenshots inside my previous answer.
Regards,
Tom
- Anonymous6 years agoNot applicable
TomMartens Unable to see default data color
May be i am using differnet chart. can i share my pbix file
- TomMartens6 years agoSuper User
Hey Anonymous ,
you are right, this seems to be related to using a column at the legend.
I recommend that you file an idea ideas.powerbi.com
Regards,
Tom