Forum Discussion
Thumbs Up & Down Conditional
- Anonymous3 years ago
Hi Rosario ,
Here I suggest you to try to add svg in icon conditonal formatting in Power BI.
Sample Code:
Arrow = // Variables to store arrow paths var uparrow = "<path d='M10 90 L50 10 L90 90 Z' fill='green' />" var downarrow = "<path d='M10 10 L50 90 L90 10 Z' fill='red' />" // Select arrow to use var arrow = IF([Diff Count 2 vs Count 1]>=0,uparrow,downarrow) // Insert arrow into SVG var svg ="data:image/svg+xml;utf8," & "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'>" & arrow & "</svg>" RETURN svgSave the picture of Thumbs Up & Down from Power Point to your PC and then open them in Visual studio to get the path. We just need to change the path in above code from Arrow Up & Down to Thumbs Up & Down.
You can refer to this video ( Using SVG in Power BI ) to learn more details. The author will show you a sample with a Squirrel icon. You should watch it from 21:00.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, thanks to who tried help me, however it hasn't been resolved yet as I want, I need the conditional result as indicated in the red circle below:
Thank U.