Connecting Dynamics 365 and Power BI with Microsoft Flow

Leave a comment

In my previous post, I discussed my prototype to show streaming live sales orders that are being entered into Dynamics 365 appear in a Power BI dashboard. Here, I will go into details on how to set this up.

First step is to create a streaming data set in Power BI. Log into powerbi.com. Select Streaming Datasets from the bottom left of the screen.

Select from the top right Steaming datasets:

Here, we are going to add 2 fields – totalamount, which is the total of each sales order, and createdon, which tells us what time the sales order appears in our system. We can see here the payload that our service is expecting. Copy this – we will use it in our Flow.

We’re now ready to set up our flow. Log in at https://flow.microsoft.com.

Then, select + Create from blank.

In the flow, search for Dynamics 365 and select When a record is created. You then need to select your Dynamics 365 organization, and your Entity name:

That provides us with our source and the action we’re hooking into.

Next, let’s define what we’re going to do with this. Select Power BI. Select the Power BI workspace we are accessing. Then select the dataset, which is what we created above in Power BI. Set the table to RealTimeData.

Now we will need the payload that Power BI is expecting. Paste it into the Payload area, and replace the constant variables with variables from the actual Dynamics 365 orders table:

Save the Flow. That’s it! It’s ready to use.

Now, on the Power BI side, let’s create a dashboard for our streaming data. Add a tile to the dashboard and select “Custom Streaming Data”:

Here we can select the type of chart and what fields will make up the values. We will select a Clustered column chart, with the Axis as createdon and the Value as totalamount. Save the tile.

Let’s also add a card for Last Order:

The dashboard is now ready to be used. Any time a sales order is entered into Dynamics 365, it will appear in our Power BI dashboard.

To simulate this, I created an app to run orders into Dynamics 365. You can see the results below.

And of course, you can view this in real time using your Power BI mobile app.

There are many possibilities with using Flow and Dynamics 365 as you can imagine.

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *

15 − five =