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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
powerbihelp87
Helper IV
Helper IV

How do I apply conditional formatting to text column in a Matrix Visual?

I am trying to apply conditional formatting on a Text Field (in Rows) with a MATRIX Visual. IF the Text is Status yes or Status #1 then change color or font. This doesn’t seem possible unless it’s a table?

 

If Text Column = yes/1 for status then Bold/highlight

StoreTextsalesnet
X1abc103541
X2def13965
X4ghi126
X5jkl22356
X6mno13569
X8pqr23698

 

dataset has following fields available as well for reference

TextStatusStatus #
abcyes1
defyes1
ghino2
jklno2
mnoyes1
pqryes1
8 REPLIES 8
amitchandak
Super User
Super User

@powerbihelp87 , You can create a color measure . That return color

Color Date =
var _min =minx(allselected(Date,Date[Year])
return
 Switch( true(),
 FIRSTNONBLANK('Date'[Year],year(TODAY()))-_min =0 ,"lightgreen",
  FIRSTNONBLANK('Date'[Year],year(TODAY()))-_min =0 ,"blue",
 "red")

if(FIRSTNONBLANK(Table[Col1],"ABC") "ABC","green","red")

 

You can use that in conditional formatting after choosing the field option. and use this measure.

 

refer

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

 

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

 

@amitchandak  thanks for the help but I dont know if this will help conditional format my "rows" in the matrix?  

02020-06-04_22-52-24.png

@powerbihelp87 , color measure needs to be used only in conditional formatting. There is no row formatting, you have to format all column using same measures

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@amitchandak I do want the entire column to be formatted but in a matrix it is in the "rows" area even though it is a column.  Once  I try to click the field in the visualizations pane there is no option for conditional formatting in matrix.  in a table the option is there

 

@ElisaT this is the question I asked, not sure if any of these answers will help you

Hi @powerbihelp87,

With the conditional formatting, you can color only the values of rows with a particular status. You can also apply formats to column header too but not on the row header.

ElisaT_0-1598282846116.png

I'm finding a way to decorate rows header too.  I think it is not possible right now. I hope in the future.

A work around I am going to use is possibly have a symbol and then the text field.  This way it stands out somehow.

mahoneypat
Microsoft Employee
Microsoft Employee

You can make a measure that evaluates the value in the status column and returns 0 or 1, and then set conditional formatting on that measure using a field value or rule in Color Scale.  For example,

 

ColorMeasure = IF(SELECTEDVALUE(Table[Status])="yes",1,0)

 

And then make a color rule on the desired column for if it is >=1.

 

Please see this link for more info - https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Thanks @mahoneypat  for looking into this. I am able to get this to work in a table but not a MAtrix Text Field.  Do you know how I can get this to work for a MAtrix Text field?  you cannot apply conditional formatting to a text in Matrix 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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