top of page
Writer's pictureVahid

How to Add Animated Effects to Power BI Buttons

Updated: Jul 26, 2023

When it comes to data visualization, a presentation can sometimes be as important as the data itself. It's not just about showing numbers and charts; it's also about providing an engaging, interactive user experience. Power BI offers a wide range of features for creating immersive, interactive dashboards. However, what if you want to add a few cool features by using some tricks to your report? In this blog post, I will walk you through a step-by-step guide on adding cool animated effects to Power BI buttons.


I will overlay a button on an animated GIF using another blank button or HTML visual, which will create a neat visual effect when you hover your mouse over the button. Ready to give your Power BI dashboards a dynamic twist? Let's get started!

Adding Animated Effects to Power BI Buttons

By using this method, I aim to add a GIF to every button in the report, then overlay these GIFs with buttons. The objective is to configure the button's style such that the GIF functions as a border that becomes visible when you hover the mouse over the button.


Step 1: Prepare Your Animated GIF

The first thing you need is an animated GIF. There are plenty of free resources online where you can create or download GIFs. The GIF should ideally be colorful and have an animation that you want to reveal on mouse hover.

You can use: https://giphy.com/


Step 2: Embed the GIF in Your Power BI Report Using a Blank Button or HTML Visual


Once you have your GIF ready, you'll need to add it to your Power BI report.

There are 2 methods for it:

  1. Using a blank button with a downloaded GIF file (Offline method):

    1. Download the GIF file

    2. Add a blank button to the page

    3. Turn off the background and visual border

    4. On the format pane, select Fill in the Button style section

    5. click on the browse and select the GIF file

  2. Using an HTML visual (Online method):

    1. From the "Visualizations" pane, select "Get more visuals" and search for "HTML Content". Download and add it to your report.

    2. Drag and drop the HTML Content box onto your report and adjust its size to fit your button.

    3. Now, you need to add the HTML code to display your GIF. Create a measure by using this code: Measure = "<img src='URL_of_your_GIF' width='width_of_your_button' height='height_of_your_button' />"

    4. Please replace "URL_of_your_GIF" with the URL of your GIF, and "width_of_your_button" and "height_of_your_button" with the appropriate dimensions. Add this measure to the value section of the HTML visual, your GIF will now be displayed in the report at the specified size.


Step 3: Create the Main Button and Adjust its States

Now, it's time to add the main button that you want to use on your report on top of the GIF that you added to the page in the previous step:

  • From the "Insert" tab, select "Buttons" and choose the type of button you want (I used a blank button to set it from scratch).

  • Positioning the button exactly over the GIF. Make sure it fully covers the GIF.

  • Turn off the Background and Visual Boarder for the button (In the format pane, Size and Style section).

  • To adjust the button's style, go to the "format" pane and select the "Button Style" button. You'll find the "Apply setting to" and then set the Default and On Hover as follow:

Default Setting:

  1. Make sure the State is Default.

  2. Add a name for the button in the Text section.

  3. Turn on the Fill section, choose a color, and set the transparency to 0% to cover the GIF completely.

  4. Ensure that the Glow option is ON, the transparency is set to 100%, and the Blur is set to 0%.

On Hover Setting:

In the On Hover section, only one thing differs from the default:

  1. Make sure the State is On Hover.

  2. Set the "Blur" option to 25px in the Glow section (You can change the Blur size, I found 25px to be ideal for my buttons).


And voilà! You've successfully added an animated effect to your Power BI button. Now, when you hover over the button, it will glow and decrease in size, revealing the colorful animated GIF behind it.


Conclusion:


While Power BI may not directly support animated effects, a touch of creativity and clever tricks can let you create unique, engaging, and interactive visuals. I encourage you to experiment and discover what other cool effects you can devise. Remember, the key to effective data visualization is balancing aesthetics with clarity and simplicity.


Now it's your turn. Try adding an animated effect to your Power BI button using the methods described above, and let me know how it turns out. Did you try a different approach or tweak some steps to better suit your needs? Do you have other innovative ways to add a touch of flair to Power BI reports? Feel free to share your creations, thoughts, and ideas either in the comments section below or by tagging us on social media. I can't wait to see what you come up with. Happy creating!

0 comments

Recent Posts

See All

Contact

  • LinkedIn
  • YouTube
  • Twitter

Thanks for submitting!

‘‘DATA is the new OIL and Analytics is the refinery’’

1_oXSyBy8JJrgaX_gllaEWTA-removebg-preview.png
bottom of page