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
Anonymous
Not applicable

Conditional Formatting by Rows in Matrix

Hello,

 

I am trying to do background conditional formatting on the rows fora measure I created in the values section of the below matrix. It is doing conditional formatting based on the columns. Is it possible to do conditional formatting across the rows instead of the columns?

 

Thank you

 

 SharedScreenshot.jpg

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

I'm afraid this is not supported in a standard matrix visual currently. However here are some similar ideas you may vote for to help improve Power BI. Thanks a lot.

Microsoft Idea · Coloring the Matrix visual based on rows or columns (powerbi.com)

Microsoft Idea · Conditional Formatting for both text value and entire row in a table (powerbi.com)

Microsoft Idea · Conditional Formatting on selected rows and columns only. (powerbi.com)

 

Best Regards,
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

I'm afraid this is not supported in a standard matrix visual currently. However here are some similar ideas you may vote for to help improve Power BI. Thanks a lot.

Microsoft Idea · Coloring the Matrix visual based on rows or columns (powerbi.com)

Microsoft Idea · Conditional Formatting for both text value and entire row in a table (powerbi.com)

Microsoft Idea · Conditional Formatting on selected rows and columns only. (powerbi.com)

 

Best Regards,
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.

amitchandak
Super User
Super User

@Anonymous , No, You can not format across row. You have to format all the columns.

 

If needed you can create a color measure and then use that for each value/column using field value in conditional formatting -

Color  = if(FIRSTNONBLANK('Table'[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170 
,"lightgreen",if(FIRSTNONBLANK('Table'[Year],2014)>2018,"red","yellow"))
Color sales = if([Sales Today] -[sales yesterday]>0,"green","red")

color =
switch ( true(),
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity1" && sum('Table'[Value]) >500,"lightgreen",
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity2" && sum('Table'[Value]) >1000,"lightgreen",
// Add more conditions
"red"
)

 

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
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.