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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
IanDavies
Helper III
Helper III

Conditional Formatting not applying as expected when using Percentages

I have a matrix, it has Business Names as Row headers and a Status as Column Headings

 

I cound the status per business like this and you can see that some have the same value in Full as in  Total (this is what we want)

IanDavies_0-1723740987160.png

 

If I convert these to % you can see them displayed as you wuold expect at 100.00%

IanDavies_1-1723741063114.png

 

but if I add Conditional formatting (Icons) based on the % it doesnt apply as one might expect

IanDavies_2-1723741144252.png

IanDavies_3-1723741200747.png

I want those with 100.00% to be green and thoswe with less to be red - what on earth is going on here?

 

all help appreciated.

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

It's quite a common misunderstanding this one. You can search the forum for solved similar issues.

Using 'percent' in conditional formatting is not about the data type, it's about

"the rule boundaries as a percent of the overall range of values" which you don't want in this case.

Use a different rule type as here:

https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting#color... 

View solution in original post

8 REPLIES 8
HotChilli
Super User
Super User

Well, not really. I want to know what the actual problem is (is it conditional formatting? Please confirm this)

--

Let's take the sample data you have shown in that last post. What's the desired outcome from that? (please show me)

If we take this matrix:

IanDavies_0-1728553285055.png

instead of the actual values I'd like to see percetanges... something like this:

 

BusinessFullSelectiveIdleTotal
Bu17%2% 58
Bu2100%  11
Bu3100%  11
Bu441%1%

58%

71

 

As a business we have move don and are just using the numbers, but it would be nice to understand the solution if you still feel like having a look at this.

 

HotChilli
Super User
Super User

"I'd also like to understand the phrase "the rule boundaries as a percent of the overall range of values" as I don't know what you mean by that and therefore don't really understand what was wrong." - that's not my phrase. That's in the linked article which has examples to explain this.

--

"what I need to show, ideally, is the count "full" as a % of the row total...  Ideally it would be in an additional column so we have the count and the % but thats not necessary." - I thought that you managed to do that first part (in the original post) but it was the conditional formatting that you were having trouble with.

-

My initial response assumed that the measure you are using in the matrix had been formatted as percentage (or the datatype of the base field of the measure was a percentage) and, when using percent in the rules of conditional formatting this was giving unplanned results. Is this a true reflection of the problem or is it something else?

 

The number in each column is an integer, it is not formatted as a percentage. The matrix is a count of values with subtotals per business and per state and does this count itself, The data is a single column in a table that indcates the state of that asset one each row.

 

the raw data would look like this in its simplest form (obviusly there are other columns as well)

NameEnforcment State
asset 1full
asset 2selective
asset 3 full
asset 4 Idle
asset 3 full
asset 4 Idle

 

Is this what you were asking

HotChilli
Super User
Super User

You have a reasonable point about the solution being accepted. It was done by one of the community support team and we don't have any control over that. I'm not too harsh on this type of behaviour because they have a job to do and we superusers are just dabblers.

Ok, to the problem itself - the link shows how to use conditional formatting when your values are in percent datatype. I'm open to you telling me it doesn't work for you. Tell me what happened when you implemented the suggested solution and why it doesn't fit your use case and i will attempt to help.

Oh, that's interesting, why would community suport folk do that... anyway, as you say its really outside the scope of this discussion. I was a bit angry when it was marked such as it felt my experience was being ignored, but thats not on you and I thank you for your further reposnse.

 

so, looking at this table:

IanDavies_0-1724326308484.png

 

what I need to show, ideally, is the count "full" as a % of the row total...  Ideally it would be in an additional column so we have the count and the % but thats not necessary.

 

I'd also lilke to understand the phrase "the rule boundaries as a percent of the overall range of values" as I don't know what you mean by that and therefore don't really understand what was wrong.

 

It is entirely conceivable that it is my own inadequacies in PowerBI that are making this difficult. I inherited it and have been self-learning for the past year or two. Most of the heavy lifting is done in M not DAX  so Ive concentrated on learning Power Query rather than PowerBI. The dashboards were, for the large part, already configured when it came to me and have remained unchanged. 

 

I thought that changing the way the values were displayed would deliver the required result as it had in other visuals, but they are tables not matrices.

IanDavies
Helper III
Helper III

I dont know who accepted the solution, but it did not provide a solution to my problem, it just told me that I was wrong and had misunderstood what PowerBi did. none of the examples at the listed URL come close to the use case I demonstarted here.

 

This is an abuse of the accepted solution system IMO.

HotChilli
Super User
Super User

It's quite a common misunderstanding this one. You can search the forum for solved similar issues.

Using 'percent' in conditional formatting is not about the data type, it's about

"the rule boundaries as a percent of the overall range of values" which you don't want in this case.

Use a different rule type as here:

https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting#color... 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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