#PowerBI Buttons with animation from Prathy’s Blog…
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:
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
Add Text to Button. For the sake of the blog post, I am just going for Button 1, Button 2, etc.
Add line shape and put it behind the Button, Send it back!
Add Fill to All buttons same as the background colour of the page and no transparency.
Select all buttons, change the fill transparency to 100 % on hover. Now your buttons will look something like below.
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.
Until next time,