Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Icons Color formatting

The new July 2019 release has this amazing feature where we can use icons directly in tables and matrix based on the column values. However i'm struggling a bit with the colors in those icons. 

 

Is there a way to change the colors of those icons in the table? 

 

Ex : Check mark in green circle is a good icon for KPI in table. But i want a darker green shade. Is it possible?

Note : I'm using SSAS tabular as backend source, so can't use unichars (for conditional formatting using DAX) and can't use advanced editor.

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi SBELANIX,

You could try to create measure to define icon color like below

Measure 2 = 
SWITCH (
    TRUE (),
    [Measure] < 0.2, "data&colon;image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='100' height='100' viewBox='0 0 100 100'> <circle cx='50' cy='50' r='40'  stroke='purple' stroke-width='4' fill='purple' /> </svg>",
  [Measure] < 0.4, "data&colon;image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='100' height='100' viewBox='0 0 100 100'> <circle cx='50' cy='50' r='40' stroke='green' stroke-width='4' fill='dark green' />
</svg>",
    "https://i.gifer.com/4Ym4.gif"
   --  "https://i.gifer.com/Omjx.gif"
)

Then use this in conditional format like below

118.PNG121.png

You could refer to Conditional Formatting Using Icons In Power BI for details

 

Best Regards,

Zoe Zhi

 

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

View solution in original post

3 REPLIES 3
dax
Community Support
Community Support

Hi SBELANIX,

You could try to create measure to define icon color like below

Measure 2 = 
SWITCH (
    TRUE (),
    [Measure] < 0.2, "data&colon;image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='100' height='100' viewBox='0 0 100 100'> <circle cx='50' cy='50' r='40'  stroke='purple' stroke-width='4' fill='purple' /> </svg>",
  [Measure] < 0.4, "data&colon;image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='100' height='100' viewBox='0 0 100 100'> <circle cx='50' cy='50' r='40' stroke='green' stroke-width='4' fill='dark green' />
</svg>",
    "https://i.gifer.com/4Ym4.gif"
   --  "https://i.gifer.com/Omjx.gif"
)

Then use this in conditional format like below

118.PNG121.png

You could refer to Conditional Formatting Using Icons In Power BI for details

 

Best Regards,

Zoe Zhi

 

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

This is another case in PBI where the solution that should be out of the box, and/or easy to implement requires an incredibly complex DAX expression.  Why does everything in PBI require the most over engineered solution for the most simple and minor ask?

Anonymous
Not applicable

Well actually the field value on conditional formatting doesn't work while connecting through SSAS cubes. But found a solution in the link you shared. We can change the color codes from JSON files. Thanks!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors