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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JuliaJules
Regular Visitor

Conditional formatting of shape fill issues using sum

Hi All, 

 

I seem to have an issue in an 'inherited' PowerBI Report. Being new to the software and having never coded beyond excel functions, I'm kind of clueless as to why the below behaviour occurs. Maybe you can help out! 

 

In my report, I have an oval shape fill conditioned based on whether my data is 'Red, Amber, Green.' 

 

JuliaJules_0-1704975189558.png

 

I see that in the dataset, whoever set this up initially rightfully translated Red/Amber/Green text into a Whole number data type using the below: 

 

_SAT Status = IF('Project Status'[Importantdecision1__c]="Red",3,IF('Project Status'[Importantdecision1__c]="Amber",2,IF('Project Status'[Importantdecision1__c]="Green",1,0)))

 

And similar for the other 2 conditions. 

 

So far so good. But here's where the tricky part starts. 

 

I'll use an example of one record which to me doesn't make sense. 

 

Clearly stated Green: 

JuliaJules_1-1704975779276.png

 

Cleary translated correctly: 

JuliaJules_2-1704975809967.png

 

And yet my colours are opposite, with one completely missing: 

JuliaJules_3-1704975873654.png

 

I assume this behaviour is related to 'Sum of...' being selected under 'Summarisation' in fx formatting of the shape but am clueless as to how to set this formatting to work correctly. Maybe this great community can shed some light on this issue? 

 

Thanks a lot folks! 

3 REPLIES 3
HotChilli
Super User
Super User

I'm not explaining myself very well.

The measure will be shown on a visual (table, card, line chart or something like that) and the conditional formatting will reflect the value of the measure.

The type of visual is important for me to know so that I can help with whether the conditional formatting is set up appropriately. For example, a card shows a scalar value (a single summary value), a matrix has rows and columns and displays a value at each intersection so shows many values.

When you are coming from an Excel background, you have to make the jump from cells to thinking about data in terms of rows and columns and (on visuals) aggregations.

If you tell me what you have and what you want to show on a visual, I can help. However I can't give a powerbi introductory course.

HotChilli
Super User
Super User

"I assume this behaviour is related to 'Sum of...'" - I think you are correct. 

Conditional formatting is based on a measure (which involves aggregation).  The value of the aggregation is determined by the context of the visual so the question is "Is SUM the appropriate aggregation for your visual in this case?".  In more basic terms, what's in the visual? What do you want the conditional formatting to show?

Thank you for your reply.  It's set up as an oval shape, not a visual, and indeed I don't think sum is the right aggregation. I'd like the formatting to be based on the single cell value with no aggregation but don't seem to be able to select that from the drop-down. Since my values are always 1, 2, 3 or 0, I just want the formatting to reflect which of the conditions is met. I went into the data view and changed Summarisation of that column to 'Don't Summarise.' This doesn't seem to have helped. I keep getting an error that my cell is not a single value cell. I guess the next step here would be to transform this column into a single value in cell column but can't seem to succeed on that. 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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