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.
PBIX – https://1drv.ms/u/s!Avm7gbgZtlMlyhlTp2zkQxArZsOG?e=Fcd1Lm
Until next time,
Prathy 🙂
6 comments
Use the padding option instead 🙂
Kind Regards!
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
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
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.
Hi Prathy, Is it possible to download the .pbix file you created this in. Thanks.
Steve, Updated the post with a link