Forum Discussion
Image display in Power BI by conditional formatting
Hi,
I want my card visual to display total number of failed orders, but when there is no failed orders, the image (smiling emoji) will be displayed. I created measure (HasfailedOrder = If([failed order]=0, 'Img URL', [failed order])) for my card visual. But it displays url instead of image when my failed order is 0. I can achieve that by using table, but is there any way to achieve that with card visual?
Thank you guys!
Hi MeiYing
You can just copy and paste the emoji to the DAX code like :test emoji = if(sum('Table'[Fail order])=0,"🙂",SUM('Table'[Fail order])&"🙁")Result :
The line of the website for copy emojis :
pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Thank you so much Ritaf1983 . It really works! But do you know if we can use other images online (not emoji), like by using URL ?
Hi MeiYing
Happy to help and yes with the new card visual, please refer to the linked tutorial:https://www.linkedin.com/pulse/power-bi-dynamic-icon-image-based-condition-new-card-visual-ali/
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
3 Replies
- Ritaf1983
Super User
Hi MeiYing
Happy to help and yes with the new card visual, please refer to the linked tutorial:https://www.linkedin.com/pulse/power-bi-dynamic-icon-image-based-condition-new-card-visual-ali/
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- Ritaf1983
Super User
Hi MeiYing
You can just copy and paste the emoji to the DAX code like :test emoji = if(sum('Table'[Fail order])=0,"🙂",SUM('Table'[Fail order])&"🙁")Result :
The line of the website for copy emojis :
pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly