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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
krixtsup3r
Helper V
Helper V

Conditional Formatting for Text in Matrix

Hi Guys,

Just need help on adding the conditional formatting on my matrix that has text value. The value is a measure that I created.

I already tried using switch or creating a helper column to do formatting but it only captures one value. 

 

Below is the measure I used:

 

Status_Measure = 
IF(
    MAX(Submission[ReStatus]) = BLANK(),
        IF(
            SELECTEDVALUE('Date Reference'[DAY NAME]) = SELECTEDVALUE(RestDay[Day]),
            "Out of Office", "No Entry"),
            MAX(Submission[ReStatus]))

 

Below is my matrix:

sc1.PNG

 

Also, below is how I related each table:

sc2.PNG

 

4 REPLIES 4
amitchandak
Super User
Super User

@krixtsup3r , I am not clear what help you need. Is the measure correct and you want to color group.

 

If Measure is correct and you want to color group. Then Create a similar measure which will now return color instead of status. And use that in conditional formatting after choosing field option.

 

Example

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"
)

 

 

Refer for steps

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

Hi Sorry 'bout that.

It's adding colors to each status. I first created something like this:

Conditional Color =
SWITCH( 
[Status Measure], 
"SUBMITTED", "GREEN",
"ABSENT", "RED" .... 

 But it doesn't work, also I have many status that I need to have colors as well.

Anonymous
Not applicable

@krixtsup3r 

Power bi Conditional format doesn't support Text in any default visuals. As a workaround, you may try the Card with States Custom Visual. See the similar posts:

https://community.powerbi.com/t5/Desktop/change-the-color-of-the-data-value-of-quot-card-component-q...

https://community.powerbi.com/t5/Desktop/conditional-font-color-in-card/td-p/223172

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Anonymous, thank you! but I am looking for something in Matrix not in Card 😞 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.