Arrow to PowerBI Card

Hi, Everyone,

Happy New Year to everyone!

I have one very simple question. In PowerBI, we can customize the color of data label and background color by using condition function. Does anybody know if there is a way to add Up or Down Arrow next to the card based on the value of the card?

For example, if the data on the card is positive, I’d like to add a Up arrow next to the card. If it is negative, I’d like to add a Down arrow with red color.

Screenshot 2022-01-05 231751

I am pretty sure someone might have the solution , I did a search on Internet, but could not find anything.

Thanks!

Mike

@Mike ,

This is 100% doable, but the trick is to use a two cell table rather than a card visual. Native card visuals do not do a good job handling icons/images.

A second approach is to do this using custom visuals, text boxes and shapes configured to look like cards - the method I used in my Data Challenge #5 submission (portion highlighted below in red). I think it ended up looking good, but frankly was a pain in the ass. I would definitely try the table approach first to see if you can get the desired look.

I hope this is helpful. If you have any additional problems or questions, just give a shout.

– Brian

Hi, @BrianJ Happy New Year! Thanks a lot for your quick response with the provided suggestion. I will check the solution and let you know if I hit road blockers.

Thanks!

Mike

@Mike ,

Happy New Year to you too! I happened to be working today on another forum solution, and the data were well suited to demonstrating the solution to your problem as well. Here’s the outcome using the two-cell table approach I mentioned, just with some icon links I already had loaded in my imgbb.com site. Here’s the key measure for the icon file - just make sure to set the type to “Image URL”.

Icon = 
SWITCH( TRUE(),
    [Average of LNReturn] < 0, "https://i.ibb.co/M5fn1fv/down-arrow-small.png",
    [Average of LNReturn] > 0, "https://i.ibb.co/Wy49pjh/up-arrow-small.png",
    "https://i.ibb.co/5xbm1sf/double-arrow-blue.png"
)

image

image

I hope this is helpful. Full solution file attached below.

Hi, @BrianJ That is awesome! it looks fantastic! I will check your solution!

Thank you very much!

Mike

@Mike ,

Always glad to help. Great question - I think this one will be of sufficiently broad interest that I plan to do a YouTube video on it.

  • Brian

@Mike ,

Thanks for inspiring the following video with a great question. In the video, I substantially expand on the solution above, walking through both the web link approach I used above, plus a way to capture the icons internally within your PBIX file using Base64 conversion.

  • Brian

@BrianJ , that is awesome, I will definitely check it out. I have a difficulty to adjust the size of image inside the PowerBI and hope that is doable in PowerBI. Thanks!

Mike

1 Like

@Mike ,

yup – addressed in the video.

– Brian