Forum Discussion
Conditional formatting in power bi matrix row headers
- 1 month ago
The cleanest way is to build a calculated column in your country/dim table that concatenates the country name with the currency symbol using UNICHAR, then put that column on the matrix rows instead of the plain country name.
Something like:
CountryLabel = Countries[Country] & SWITCH(TRUE(), Countries[Country] = "United Kingdom", " " & UNICHAR(163), Countries[Region] = "Europe", " " & UNICHAR(8364), "" )UNICHAR(163) is £, UNICHAR(8364) is €, UNICHAR(36) is $, and so on. Countries that don't match any condition just show their name with no symbol, which sounds like what you described.
If sort order matters, keep the original country column in the table and set Sort By Column on your label to the plain country name so it still sorts A to Z.
The conditional formatting Icons feature on a matrix works off measure values, so it won't let you mix symbols per row the way you want. Concatenation is the practical route.
If this helped, a thumbs up and marking it as the accepted solution would be appreciated.
Thanks,
Shai Karmani
Hi,
Yes, this is possible, but there are a few limitations to be aware of.
Power BI currently supports icon conditional formatting for values in a Matrix, but row header fields (such as Country) don't support conditional formatting with icons directly.
A few common workarounds are:
- Create a calculated/display column that appends a Unicode symbol to the country name (for example, France €, United Kingdom £). This is the simplest approach if you only need static symbols.
- Use a DAX measure or calculated column to return the display text based on your business rules (for example, append € for European countries, £ for the UK, and leave other countries unchanged).
- If you need richer visual indicators (such as colored icons or images), consider using a custom visual or redesigning the report with an additional indicator column, since native row headers don't support icon conditional formatting.
So, while native icon conditional formatting isn't available for Matrix row headers, using a calculated display field is generally the easiest and most maintainable solution.
Hope this helps!