Create a data refresh button in Power BI to give users the ability to refresh a data source on demand. Power BI has a built-in function to quickly and easily create buttons that execute Power Automate workflows. We’ll look at how to set this incredible feature up to give report viewers added capabilities to work with datasets outside of their normal refresh schedule.
The ability to integrate Power Automate workflows into Power BI is a relatively recent addition to the Power BI platform. Power Automate is an incredibly useful tool that lets you execute commands that otherwise wouldn’t be possible and can even interact with systems outside of the Power BI universe.
Let’s take a look!
Table of Contents
Why Power BI Data Refresh Buttons are Useful
Power BI lets developers publish reports to the Power BI Service at PowerBI.com where they can setup pre-defined refresh schedules. Refreshes are setup at specific times of day where Power BI will reach out to the source data and re-calculate reports based on the latest information.
The problem with relying on this method occurs when data is frequently updated or updated off-cycle. You can get around some of these limitations if a live data connection is available, but there are a number of limitations when working with them and items like Excel files saved to One Drive or SharePoint won’t automatically update a Power BI report unless a manual refresh is started.
This is where Data Refresh Button comes into play. A Data Refresh Button in Power BI allows users to manually update their data at will without leaving the standard report view.
Limitations of Power BI Data Refreshes by License Type
Power BI offers different types of licenses, and each comes with its limitations concerning data refresh. The two licensing types are Power BI Pro and Power BI Premium. One of the biggest differentiators of the two is the number of times data can be refreshed in a day.
A Pro License is limited to 8 refreshes per day, and a Premium License is limited to 48 refreshes per day.
Even when setting up a button to manually refresh data, you will be subject to these limitations. The refresh limits can cause confusion as they won’t return an error message, but if users frequently hit the refresh button they will find at some point the data will stop refreshing.
In these scenarios someone will still have to go to the Power BI Service and manually refresh a dataset from their workspace.
What is Microsoft Power Automate?
Microsoft Power Automate, formerly known as Microsoft Flow, is a cloud-based service that enables workflow automation across multiple apps and services. Power Automate makes it easier to connect different Microsoft applications and automate repetitive tasks without coding.
Power Automate is part of the Microsoft Power Platform and licensing is often included in the most common enterprise Office 365 licenses. If you do not have access to it, check with our IT department to see if they can enable it for you.
For a better overview of Power Automate, here’s a quick video on how to create your first flow.
Luckily, today we won’t have to go into this much detail but it’s an incredibly useful product to be familiar with in the Microsoft Power Platform
How to Create a Data Refresh Button in Power BI with Power Automate
To create a data refresh button in Power BI, navigate to Insert, Power Automate in the Power Platform Section of the Power BI Report Ribbon. Rather than inserting a button, it inserts a visual that explains the steps to creating a button linked to a Power Automate workflow. From the visual, you can setup a workflow, apply it, and a button will automatically be generated.
To get started, click the Power Automate button from the Power BI ribbon, it will generate a visual like the one below explaining the setup steps.
Move your mouse over the three dots … at the top right of the Power Automate visual, and select Edit.
This will open up an embedded screen to setup the Power Automate workflow. If you already have a Power Automate workflow setup to refresh a dataset, you can choose it from the list of available workflows. Otherwise click on the + New sign at the top left corner of the screen and select Instant Cloud Flow.
The next screen will start with an action of when a Power BI button is clicked. This will be the starting point to trigger the following flow.
Flows are put together in steps, and are interpreted by reading from the top trigger action that starts the workflow, to step 2 below, step 3 below that etc. etc.
You will want to click the + sign to add a second step. In many cases Power BI will automatically recommend actions, such as Refresh a Power BI Dataset. If it does not show up automatically you can either click on the Power BI section or click into the search box to find the refresh a dataset action.
After adding the refresh a dataset action, you can further configure it by pointing to the workspace and the dataset that you want it to refresh. For this to work, a report must be previously published or a dataset must already exist in the Power BI Service.
This is because the Power Automate Workflow will need to know where to look for a dataset that is refreshed when a button is pressed.
Once you finish assigning a dataset to the Power Automate workflow, click on save.
After Saving the workflow, mouse over the Refresh a Data set Row and click the Check Mark at the right side of the entry to Apply the changes.
After the changes are applied, you can navigate back to the starting dashboard screen and a new button will be created. The button by default will be blue and say “Run Flow’
Once the button is setup, you can select it and go to the format options panel to adjust colors, text, and other formatting options to help it blend into your existing report design.
Other Ways to Setup Power Automate Buttons in Power BI
Going a step beyond embedding Power Automate for a manual data refresh button, you can create custom workflows that can interact with a number of systems. Here are some popular use cases that you may want to consider launching with a Power BI button.
- On Demand Real-Time Data Refreshes
- On Demand E-mail copies of Power BI pages as PDF or PowerPoint
- Start Approval Workflows for requests related to embedded data.
- Send E-mail Alerts for KPI Thresholds
The following video from Guy in a Cube highlights some more tips, trucks and use cases for using Power Automate with Power BI together.
As you can see, Power Automate and Power BI are a great combination. Microsoft has made many strides to make it easy as possible to work with different components of the Power Platform all in one place for a more seamless end user experience.
By using creating a manual data refresh button using the built in Power Automate tool in Power BI you can give report viewers the capability to refresh a data source on demand. Using Power Automate eliminates the need to manage complex connections or setting up interactions with the Power BI Service API. The tool will walk you through a wizard to build a workflow if you haven’t created one already.
For this method to work, you will first need to publish your Power BI dataset to the Power BI service so you are able to reference it within the workflow.
It’s important to remember that even when Power BI is integrated with Power Automate the number of times that a user can refresh a dataset will be limited by their Power BI license.