cancel
Showing results for 
Search instead for 
Did you mean: 

conditionally changed colors of legend not working

Hello I am stuck with conditionally changing colors of Legend in bar chart. I apply following code  to conditionally format legend and it doesnt work. When I switch legend to X axis and do the same for columns it works.

Simple function to search right #code

Test Colors Gender = LOOKUPVALUE(Colors_PBI[Color], Colors_PBI[Name ], SELECTEDVALUE(TD_Consumer[Gender]), [Alternate color])

 
Can you help me please?
 
Thanks
Pavelbug.png
Status: Needs Info

Hi @PavelHanus ,

 

What's your version of your power bi desktop?

If it is not the latest version, please update to the latest to try.

 

Best regards,

Community Support Team Selina zhu

Comments
v-mengzhu-msft
Community Support
Status changed to: Needs Info

Hi @PavelHanus ,

 

What's your version of your power bi desktop?

If it is not the latest version, please update to the latest to try.

 

Best regards,

Community Support Team Selina zhu

PavelHanus
Frequent Visitor

PavelHanus_0-1669715647379.png

 I think I have the latest one.

 

thanks for investigating it

v-mengzhu-msft
Community Support

Hi @PavelHanus ,

 

Your power bi desktop is October version.

Microsoft has implemented the November version. New versions tend to fix some of the problems that existed in older versions, and you can update to the November version to try it out.

 

Best regards,

Community Support Team Selina zhu

PavelHanus
Frequent Visitor

I have updated my PBI and it is still dowsnt work.

see details of my version below:

 

PavelHanus_0-1670251940341.png

 

 

Thank you 

Pavel

AWOL_Kiwi
Regular Visitor

Hi. 
I have a similar issue, I use measures to define the colours of the column and line of a line and clustered column chart. The colours of the line and columns are correct, but in the legend only the line has the correct colour.

 

legend colours not correct with red pencil.png

 

Under the Legend options I have toggled on "Match line color" (incidentally I do want this option available regardless of what is selected in the Style field. Currently the option is only available with the Marker (circle default) value).
Legend matches line colour option.PNG

 


Note that the "Line and stacked column chart" suffers from the same bug too.