Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register 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!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
92 | |
83 | |
71 | |
49 |
User | Count |
---|---|
143 | |
121 | |
111 | |
59 | |
57 |