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 PaisleyPrince ,
Could you please review the solution provided above and let us know if you have any further questions.
Thanks!!