Trigger automated workflows directly and with filter context in Power BI Report with Power Automate Visual

April 18, 2021
Denis Selimovic
Data visualization, Power Automatecomment 3Created with Sketch Beta.0 comments

This post is also available in: German

Last Friday, Microsoft released the latest Power BI update a little earlier than usual. The highlight from my point of view is the Power Automate Visual ( previously Microsoft Flow), which works with the now released April 2021 version of Power BI.

What is Power Automate?

With Microsoft Power Automate it is possible to combine tasks and workflows with different applications in order to automate them. Over 300 services are now supported, for example Dropbox, Outlook, Power BI, Sharepoint, Twitter, SalesForce, etc.

Application areas can be simple notifications, but also very complex and highly automated workflows.
A few examples could be:

  • When a new record is added to a SQL Server table, push it to a Power BI Live Dataset
  • If I got linked on Twitter, send me a message in Microsoft Teams
  • When a new lead is created in Dynamics CRM, start a new workflow, notify the responsible employee by email and save copies of the job as a PDF in Dropbox

There is also a Windows application that can be used to automate operations in other desktop programs. Overall, a very enjoyable thing that actually makes working life a lot easier and significantly increases productivity.

So how does this work in Power BI?

The process in relatively simple. The first step is to add the Power Automate Visual from the Marketplace:

Adding the Power Auotmate Visual from the Marketplace
Adding the Power Auotmate Visual from the Marketplace

After adding the new visual, it also lets us know what the next steps are:

The Power Automate Visual explains the next steps
The Power Automate Visual explains the next steps

Create tasks for individual orders in Microsoft To Do

My demo flow is to create a task for me in Microsoft To Do (formerly Wunderlist) when I notice while analyzing in Power BI that I need to further review an order.

In order to do this, I need to add the fields to the Power Automate visual that I want to save later in To Do:

Add required fields to the Power Automate Visual
Add required fields to the Power Automate Visual

After that I can go to the options of the visual and use “Edit” to create the flow in Power Automate:

image 4
Create flow for Power Automate button

With “New” you can either create predefined tasks or create completely new flows with “Instant cloud flow”:

Create new flow
Create new flow

In our case, we simply use the “Create a task from Power BI” template and modify it a bit:

Configure new flow in Power Automate
Configure new flow in Power Automate

I specify the “Due Date” as one week from today. This can be done with the following expression:

formatDateTime(addDays(utcNow(), 7), 'yyyy-MM-dd')

I will set the reminder in 2 days. This is the same formula as the “Due Date” but only 2 days later instead of 7 and I set the “Start Date” to today’s date. After saving and applying the flow, it is also ready for use:

Run Power Automate Flow with the selected records
Run Power Automate Flow with the selected records

The selected records will immediately appear in Microsoft To Do as a task in the selected folder:

Tasks were created in Microsoft To Do for selected items
Tasks were created in Microsoft To Do for selected items

Further examples

Do you have any other ideas on how to use the Power Automate Visual? Feel free to write it in the comments!

Help button for issues with a report

It would also be possible to place a “Help request” in the report. This allows the user to contact the person responsible for the report directly via teams:

Help button inside the report itself
Help button inside the report itself

The button triggers a message in Teams:

Configuration of the flow for the message in Microsoft Teams
Configuration of the flow for the message in Microsoft Teams

With which you can get in touch with the user directly:

Teams Message was sent via Power Automate Flow directly from Power BI
Teams Message was sent via Power Automate Flow directly from Power BI

Refresh of the data set with the push of a button

Possibly the most common flow used in real-world applications could be the update of the associated Data Set via Power Automate at the push of a button:

Refresh of a Power BI Data Set via Power Automate
Refresh of a Power BI Data Set via Power Automate

Mailing the Power BI report as a PDF

A last example that we might encounter more often in real life is sending a report as a PDF via email. However, this currently requires Premium Capacity:

Export of a Power BI report as PDF
Export of a Power BI report as PDF

What ideas do you have with Power Automate within Power BI? Write it down in the comments if you like