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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
KrisCachia
Frequent Visitor

re: Datamatrix Custom Formatting of Row Colors

Hi all,

 

I am relatively new to powerbi and i am creating a report with various visualisation charts like pie chart, column chart and a datamatrix table. I want to use the same colours of each product on the pie chart and apply them to column chart and to each product row in the matrix table. 

 

Is there an easy way of doing this ? 

 

Any help would be greatly appreciated 🙂 

2 ACCEPTED SOLUTIONS
v-deddai1-msft
Community Support
Community Support

Hi @KrisCachia ,

 

For pie chart and column chart. you can change the color for all legends in  Data colors:

Capture.PNG

 

For matrix, you can use conditional formatting : https://medium.com/@raghu.949/conditional-formatting-of-matrix-visual-in-power-bi-9d37dd70c52e

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

 

View solution in original post

KrisCachia
Frequent Visitor

thanks for the feedback guys, based on your help and some of my research i found a way how to set pie, column visuals and matrix products all with the same colors 

 

I added a field column in my sharepoint list datasource called product color and entered colors for each product, and in powerbi matrix used conditional formatting on product values based on the product color field. Voila values in matrix colors automatically coloured. Then in each visual, pie and column, i manually added the hex code of each color which was entered in the product color column.  

 

A good update for powerbi would be if they introduce a feature that would allow visualisation colors of field to be controlled via color name or hex code value coming from a column in datasource. That would give power bi better control to standardise colors beteween visualisations and data matrixes  

View solution in original post

4 REPLIES 4
KrisCachia
Frequent Visitor

thanks for the feedback guys, based on your help and some of my research i found a way how to set pie, column visuals and matrix products all with the same colors 

 

I added a field column in my sharepoint list datasource called product color and entered colors for each product, and in powerbi matrix used conditional formatting on product values based on the product color field. Voila values in matrix colors automatically coloured. Then in each visual, pie and column, i manually added the hex code of each color which was entered in the product color column.  

 

A good update for powerbi would be if they introduce a feature that would allow visualisation colors of field to be controlled via color name or hex code value coming from a column in datasource. That would give power bi better control to standardise colors beteween visualisations and data matrixes  

v-deddai1-msft
Community Support
Community Support

Hi @KrisCachia ,

 

For pie chart and column chart. you can change the color for all legends in  Data colors:

Capture.PNG

 

For matrix, you can use conditional formatting : https://medium.com/@raghu.949/conditional-formatting-of-matrix-visual-in-power-bi-9d37dd70c52e

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

 

Anonymous
Not applicable

@KrisCachia - I think you want to use the colours of your pie chart in your column charts and matrix.

You can chnage the data colors of column chart from the format tab under visualization tab.

And for matrix you can write formula for the coloring.

 

Appreciate your kudos!! Mark this post as solution if it helps.

amitchandak
Super User
Super User

@KrisCachia , pir visual do not support conditional formatting. So you can not fix the color for product.

 

In matrix it is possible. you can a color measure like this example

color =
switch ( true(),
FIRSTNONBLANK('Table'[Product],"NA") ="Product1" ,"lightgreen",
FIRSTNONBLANK('Table'[Product],"NA") ="Product2" ,"lightgreen",
// Add more conditions
"red"
)

And use that in conditional formatting using field value option

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors