Conditionnal formatting based on hex code

Hello to all,

I have the following question:
as in the attached pbix we have a table containing clients, dates and values.
This table is connected to another one named ‘client’’ where for each client there is a hex code for a particular color.
Our goal is to have a stacked bar chart with ‘‘clients’’ as a legend but we would like for their color to be based on the color from the ‘‘Client’’ table.
Uusally, for formatting I would use a SWITCH function in which I would hard code the hex code value needed, but in this case I dont see how the switch value can help.
If you have any advice, it would be appreciated.

Thanks much,

Cédric
color formatting.pbix (41.7 KB)