Forum Discussion
Icons Color formatting
- 7 years ago
Hi SBELANIX,
You could try to create measure to define icon color like below
Measure 2 = SWITCH ( TRUE (), [Measure] < 0.2, "data: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: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
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.
Hi SBELANIX,
You could try to create measure to define icon color like below
Measure 2 =
SWITCH (
TRUE (),
[Measure] < 0.2, "data: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: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
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.
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!