The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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!