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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
pattaninlua
New Member

Conditional Formatting on Count %RT

Hi, 

 

There was a request to add conditional formatting to the following Matrix (Cropped to remove confidential name features) to highlight when values are above 50% 

 

image.png

 

The percentages were formed from using %RT as shown here

image.png

From previous attempts, I have tried to apply conditional formatting but it seems to apply to the total count rather than to count % (I also have a table next to this one which shows that).

 

Is there a way to do this?

 

Notes:

The counts are items in column (upc_id) which I have created a measure as follows: countSKUs = count(table[upc_id])

The row columns are items in column (Status 1)

10 REPLIES 10
cengizhanarslan
Super User
Super User

Select the matrix → Format pane → Conditional formatting (Background color or Font color) for the value you want:

  • Format by: Field value

  • Based on field: RT Color

_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.

I have tried that already but there is no option to select %RT in Field.

pattaninlua_0-1767712889723.png

Another option would be much apreciated

HI @pattaninlua ,
To resolve the issue, first create a measure to calculate the count of the relevant field. Then, build a separate percentage measure based on that count, ensuring it reflects the proportion of each category within the selected context and is formatted as a percentage. Next, create a color measure that assigns different colors depending on the percentage thresholds, making sure totals or grand totals are excluded if needed. In your matrix visual, replace the existing percentage field with the new percentage measure, and apply conditional formatting using your color measure. To do this, choose background color formatting, set the format style to 'Field value', apply it to values only, and select the color measure as the field to base the formatting on. This approach ensures that conditional formatting correctly reflects the percentage measure rather than raw counts.

Find the below attached .pbix file for your reference.

Thank you.

Hello @pattaninlua ,

 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

 

Thank you.

Hi @pattaninlua ,

 

I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.

Thank you.

 

amitchandak
Super User
Super User

@pattaninlua , While apply you have option where to apply or GT or all rows. 

You can create a measure like below and use that in conditional formatting in font or background 

If([% RT] >=.5 , "Red", "Green") 

If you want to hide the number, use "#FFFFFF00" or have the same color for font and background. Use this in conditional formatting using the field value option 

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

for [% RT], how does one achieve this? I cannot seem to create a separate measure for [% RT] values

@pattaninlua , You can use Any measure which you have Like [RT % COuntSKUs] and can have various logics 

These are just examples


Color Date = if(FIRSTNONBLANK('Date'[Date],TODAY()) < date(2022,04,10) ,
Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .75 , "Amber" ,
"Red "
) ,
Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .5 , "Amber" ,
"Red "
)
)

Color = Switch( True() ,
Max(Table[Status]) < 200 ,
Switch(true(),
[ERB] = .25 , "Orange" ,
"Red "
) ,
Max(Table[Status]) < 500 ,
Switch(true(),
[ERB] = .25 , "Orange" ,
"Red "
) ,
Switch(true(),
[ERB] = .25 , "Orange" ,
"Red "
)
)

 


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

Still unable to do so, I have created this measure but when I try to add the conditional formatting, it does not allow me to select the measure

color = if(FIRSTNONBLANK('pricing_index_test'[upc_id],[countSKUs]) < 0.5 ,
Switch(true(),
[countSKUs] >= .6 , "Green" ,
[countSKUs] >= .4 , "Amber" ,
"Red "
))

pattaninlua_0-1767692623553.png


If any other method is more helpful, I am happy to hear

@pattaninlua , use the field value option 
Only Text Measures 

amitchandak_0-1767695165761.png

 

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.