Reputation: 7178
I want to visualize reports of bikes. Now bike comes in 150 different color models. I have color values (in hash) for each model. I want to visualize power bi reports with bike's actual colors (not arbitrary colors assigned by power bi)
Model to Color
Model | Color |
---|---|
Model1 | #aaaaaa |
Model2 | #bbbbbb |
Model to Sale
Model | Sale |
---|---|
Model1 | 10 |
Model2 | 20 |
How to do that in power bi? How to reference from color table instead of manually putting data color for each model?
Upvotes: 0
Views: 256
Reputation: 7891
With the following relationship:
You can create a measure to return the appropriate color:
Model Color = SELECTEDVALUE ('Model to Color'[Color] )
Now apply background conditional formatting, using this measure:
And your model field is coloured according to the Model by Color value:
Upvotes: 1