Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi
How do I Apply Random Colours to Bar Chart?
Please sample data below - i want every Team Name to have a Different Colour?
Solved! Go to Solution.
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
Proud to be a Super User!
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
Proud to be a Super User!
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
111 | |
109 | |
94 | |
61 |
User | Count |
---|---|
171 | |
139 | |
133 | |
103 | |
86 |