Forum Discussion

fjjpeeters1976's avatar
fjjpeeters1976
Icon for Helper III rankHelper III
2 years ago
Solved

Icons in card visual / conditional formatting

 

Hi all,

 

I want to create some cards (new) that show me an icon. 1 means green icon, 2 means yello icon and 3 means red icon.

I have first done it in a table, but that has its limitation. So as I see Power BI introduced new cards I would like to show it in a card. But there is no standard conditional formatting where I can say if 1 use green icon etc. 

What would be best way to solve this. Are there codes for the icons that I could use in a measure?

 

 

kind regards,

Frank

 

3 Replies

  • Hi fjjpeeters1976 

    You can achieve it using dax code ( for every measure )

    formatted kpi = if([kpi 1]=1,"🟢",if([kpi 1]=2,"🟡","🔴"))

    The icons that I used are from the linked website:

    https://www.i2symbol.com/symbols/circle

    You just select the needed icon click on it and copy and paste it into the code.

    The link to the sample file 

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.