Home Design #PowerBI Buttons with animation

#PowerBI Buttons with animation

by Prathy Kamasani

The inspiration behind this post solely came from WHO website https://www.who.int/. I went onto to check some COVID data and found quick links on the main page quite interesting, hence this post. Using Buttons in Power BI is straight forward, and we see many Power BI report designers using it more often. What I observed, not everyone uses the amazing extra functionalities of Power BI Buttons. In this post, I want to use properties of Buttons, Shapes and try to achieve the look and feel I saw on the WHO website. The look I am going for is below:

 

Let’s see how we can create it in Power BI:

  1. Create a button, follow this article to create a button in Power BI Desktop – https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-buttons
  2. Add Text to Button. For the sake of the blog post, I am just going for Button 1, Button 2, etc.
  3. Add line shape and put it behind the Button, Send it back!
  4. Add Fill to All buttons same as the background colour of the page and no transparency.
  5. Select all buttons, change the fill transparency to 100 % on hover. Now your buttons will look something like below.
  6. Now change the text of each Button on Hover with a prefix of Empty Characters. Yes, empty characters!

https://emptycharacter.com/ is your friend when it comes to empty characters. From here copy an empty character and paste infant of your text in the Button. In this example, I pasted Empty Characters before Button Text on Hover. I went for three empty characters before each Button Text. That’s it, and you will have a subtle animated effect on your buttons.

I am sure someone out there must be thinking, why don’t we add a space before the text, I am sorry but that doesn’t work. Don’t know why! I am sure, Power BI doing something cleaver to not to show empty spaces before the text. Hope someone finds this post inspiring.
PBIX – https://1drv.ms/u/s!Avm7gbgZtlMlyhlTp2zkQxArZsOG?e=Fcd1Lm

Until next time,

Prathy 🙂

You may also like

6 comments

Niek Verhoef 1 September 2020 - 12:29 pm

Use the padding option instead 🙂

Kind Regards!

Reply
Niek Verhoef 1 September 2020 - 10:25 am

Hi Prathy,

Nice way of creating buttons.
One tip, instead of using empty characters before the button text use the padding option in the button text menu. Personally I think that would make it an even cleaner solution.

Keep up the good work!

Kind regards,

Niek Verhoef
EY Netherlands

Reply
Brendan Donoghue 1 September 2020 - 5:25 am

Hi Prathy, thanks for sharing. I’ve tried several times and just can’t seem to get how you managed to make it work so when you hover over the page number it automatically shows the word with the 3 spaces. I’ve gone to the link you provided (empty characters). Did you use method 1 and where did you copy it in power BI? Thanks

Reply
Addend Analytics 27 August 2020 - 6:02 pm

Fantastic Blog post on power BI! This post was really helpful and I loved reading it. Thank you very much and keep sharing such informative articles.

Reply
Steve 26 August 2020 - 8:46 am

Hi Prathy, Is it possible to download the .pbix file you created this in. Thanks.

Reply
Prathy Kamasani 26 August 2020 - 9:31 am

Steve, Updated the post with a link

Reply

Leave a Reply