Forum Discussion
PBI Desktop & Service BUG: Icon Rules conditional formatting occasionally displays wrong icon
- Anonymous11 months ago
Hi rmsolfest,
thanks for testing those options. Since the Unicode icon approach may affect the color formatting and you haven’t had a chance to try it yet, would you like some more time to test it out? Or are you looking for an alternative workaround in the meantime?
Thanks & Regards,
Prasanna Kumar
Hi rmsolfest
What you’re seeing is a known limitation/bug in Power BI where icon rules can behave incorrectly when a measure returns a value in a filtered context with a single row. This happens because the conditional formatting engine evaluates the measure differently when there’s only one row in the matrix.
Workarounds / Solutions:
Wrap your measure in IF(HASONEVALUE(...)) or COALESCE:
Ensure the measure always returns a numeric value even when a single customer is selected. Example:
IconMeasure =
IF(
HASONEVALUE('Customer'[CustomerName]),
DIVIDE(SUM('Table'[Value]), SUM('Table'[Total])), -- your existing calculation
DIVIDE(SUM('Table'[Value]), SUM('Table'[Total]))
)
Force the measure to return a consistent format:
Sometimes, formatting as decimal instead of percentage avoids the misinterpretation by the icon rules.
Example: If your measure returns 0.75 instead of 75%, the icon rule will work consistently.
Test with a dummy “all customers” context:
Create a measure like:
IconMeasure_All =
IF(
ISFILTERED('Customer'[CustomerName]),
[IconMeasure],
[IconMeasure]
)
This can help Power BI’s icon logic evaluate consistently even for single selections.
Alternative approach:
Use Unicode symbols / conditional formatting with field value instead of icon rules for more stable behavior.
Sometimes switching from Icon rules to Field value icons avoids the bug.
If this helps, consider marking it as the solution and giving a kudo!
Nabha Ahmed
Thanks for the solution detail you provided!
I tested all but the changing the measure to producing an Unicode Icon without any impact on resolving the visual bug/issue.
The unicode looks like a possible solution, but would change the color coded format of the icon. I am not yet able to test this at this time.
- Anonymous11 months agoNot applicable
Hi rmsolfest,
thanks for testing those options. Since the Unicode icon approach may affect the color formatting and you haven’t had a chance to try it yet, would you like some more time to test it out? Or are you looking for an alternative workaround in the meantime?
Thanks & Regards,
Prasanna Kumar