Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Gnanasekar
Helper III
Helper III

Chart colours

Hi All,

 

Is it possible to use categorical variables such as (Colour/Department) etc.. to colour the simple bar and column charts)?
For e.g. if i have a sales by product chart, and each product belongs to a particular department.
Can i create a column chart which shows the sales by product and a colour coding based on the department?

 

By

Gnanasekar

4 REPLIES 4
Sunkari
Responsive Resident
Responsive Resident

No, it's not possible.  

v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @Gnanasekar,

 

Have you tried the solution provided by @Anonymous above? Does it work in your scenario? If it works could you accept it as solution to close this thread?

 

If you still have any question on this issue, feel free to post here. Smiley Happy

 

Regards

Anonymous
Not applicable

Hi

 

  You can achieve that by using legend. Check the below screenshot. Let me know if you need some other logic.

Legend.png

Hi @Anonymous and @v-ljerr-msft

When i  use the department as legend, there is a bar corresponding to each department for every product. ie, there are 3 bars corresponding to A,B,C for every product. We will be having more than 100 products and so the bars will be displayed like lines.

Sales is calculated as the MRP*Qty.

 

pastedImage.pngpastedImage (1).png

 

By Gnanasekar

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.