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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
KrisCachia
Regular 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
Regular 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
Regular 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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.