Forum Discussion
Sean-OReilly
5 years agoHelper IV
How do I Apply Random Colours to Bar Chart
Hi How do I Apply Random Colours to Bar Chart? Please sample data below - i want every Team Name to have a Different Colour?
- 5 years ago
Hi Sean-OReilly
Create a measure like this
BarColor = "#" & MID("0123456789ABCDEF",RANDBETWEEN(1,16),1) & MID("0123456789ABCDEF",RANDBETWEEN(1,16),1) & MID("0123456789ABCDEF",RANDBETWEEN(1,16),1) & MID("0123456789ABCDEF",RANDBETWEEN(1,16),1) & MID("0123456789ABCDEF",RANDBETWEEN(1,16),1) & MID("0123456789ABCDEF",RANDBETWEEN(1,16),1)This generates a color in Hex e.g. #75AD21
Select the bar chart and under Format -> Data Colors click the fx button to enter the Conditional Formatting
Set a rule like this
Regards
Phil
Sean-OReilly
5 years agoHelper IV
thanks PhilipTreacy 👍