Track Flows using Power BI

This post is in three parts. The first part is to create the dataset in Power BI, the second part is to add actions to the flow and the final part is to create a simple report in Power BI.

Creating a Hybrid Dataset

For the first part we need to start in Power BI, which can be found athttps://powerbi.microsoft.com. Power BI uses workspaces to organise datasets, reports and dashboards, with a free license you will only have access to My Workspace, that will work for this exercise.

Click on My Workspace and then Datasets.

In the top right hand corner, click +Create and select Streaming Dataset.

Choose API as the source of the dataset and click Next.

Enter in a name for the dataset.

Enter in the value names and data types.

Turn on Historic data analysis to make the dataset a Hybrid of a streaming and push dataset. This means the data will be kept rather than only a temporary store.

Click Create and the pane will show a message that the dataset has been created.

Click close to show the dataset in the list.

Add Actions to Flows

For every flow you want to track you’ll need to add two parallel actions, one for a successful run and one for a failed run. This will allow you to track not only how many flows ran but their final result.

Edit the flow and click to add an action at the end of the flow and search for Power BI and select Add rows to dataset.

Rename the step to Add Success Row to dataset.

Select the workspace, dataset and the table is RealTimeData.

Enter in the values for the dataset. To make reporting easy we are going to split the when the flow happened into date and hour. The expression formula for the date and hour are:

Add a parallel branch to the previous step and create a step identical to the previous step with a response of Failed.

This step needs to run if the flow is not successful.Click on the ellipse in the top right of the action and select Configure run after.Untick is successful and tick has failed, is skipped and has timed out.Click done to save the changes. The arrow into the action will change to red.

Save your flow. Repeat the above steps on the other flows you want to track.

Creating a Report

In this post we will create a simple report to show the flow activity.

Back in Power BI and the dataset list and click on Create Report.

In the Visualizations pane select Stacked column chart.

From the fields list, drag Hour to Axis, Response to Legend and Flow to Value.

A column chart will show the number of flows per hour. You could plot different charts using days, different flows etc

Conclusion

This method could be expanded to track multiple flows and could track different aspects of the flow including times it took approvals to happen or how often approvals are requested.

Hi mgilbertThese steps can be added to any flow. If you want to run a dummy test create a flow with a button trigger. As for if the flow is company wide, that depends on the trigger and how you share it. For example if the trigger was a document being updated in a library, anyone who had edit access to the library could trigger it and then your report would show how many edits were done in that library.

Daniel is a Business Productivity Consultant & Microsoft Business Solutions MVP who is very enthusiastic about all things Office 365, Microsoft Flow, PowerApps, Azure & SharePoint (Online).
Since the preview, Daniel has been working with Microsoft Flow and later on with Microsoft PowerApps. That led to him being awarded an MVP Award for Business Solutions. He loves to blog, present and evangelize about improving productivity in the modern workspace with these amazing tools!

Michelle is an Office 365 solution architect in Twin Cities, MN. She has been delivering business collaboration solutions for years with her focus on SharePoint and Office 365. Michelle is a recent board member of the Minnesota Office 365 User Group and has been a member of the SharePoint community since 2009. She is a frequent speaker at MNSPUG and SharePoint Saturday and co-chaired the Legal SharePoint User Group for 4 years. Her most frequent projects have involved rolling out a large deployment of Office 365, SharePoint Online intranet, build of a "CHAMPS" Office 365 user adoption program and most recently, SharePoint On-Premise to Online Migration. Michelle is very excited about cloud technology as it is shifting her IT Pro focus to collaboration strategy and technical adoption.