Reputation: 1174
I have a numeric field in my data source that is unsummarized. There is no aggregation on this field.
I would like to format this field to use a red font color whenever the field value is greater than or equal to 100.
Otherwise, I would like the font color unaltered.
I cannot seem to find a way to do this in the Power BI Conditional Formatting dialogs.
If I try:
Format By: Field Value
Apply To: Values Only
I cannot select the field in the Based on field. It is grayed out.
If I try:
Format By: Rules
Based of Field:
It immediately plugs a 'Count of ' aggregation qualifier on the field. There is no way to turn off the summarization.
I simply want to use a red font color if a field value is greater than or equal to 100. Is there any way to do this in Power BI?
Upvotes: 0
Views: 269
Reputation: 40204
Unless you are using your field as a dimension (e.g. row/column header or the x-axis on a chart), it's pretty much always going to be aggregated (summarized) inside the visual, even if it only has a single value. If you have a single value, then MAX, MIN, SUM, AVERAGE should all return the same value and you can use any of them as your summarization.
The automatic summarization of a field is called an "implicit measure". You generally have more control writing your own explicit measures. For times when I know that I only want a single value, I tend to write explicit measures like this
FieldValue = SELECTEDVALUE ( Table1[Field] )
The advantage of this over MAX or SUM is that I get a blank when there are multiple values, alerting me that something has gone wrong.
Explicit measures like this will show up as options to use in the conditional formatting interface.
More information on implicit and explicit measures:
https://radacad.com/explicit-vs-implicit-dax-measures-in-power-bi
https://towardsdatascience.com/understanding-explicit-vs-implicit-measures-in-power-bi-e35b578808ca
Upvotes: 1