7. 62. Embed canvas apps in Power BI reports and dashboards
In this video, we’re going to look at how we can embed Canvas apps in Power Bi Reports and Dashboards. So, let’s start off with Power Bi desktop. We have insert power apps. You may also have it in the visualizations as well. If not, it’s there in the Power platform section of Insert. So I’ll click on any Insert PowerApps and you can see it’s a threestep process. First of all, select the fields from your data set that you would like to use in your app. So I’m going to use, for example, the account’s name and the description. Now you need to do this even if this is an existing app that you want to use. Then at the top, it doesn’t quite say so, but you need to select your environment.
So I’m going to go to the per user environment. And then you can either choose an app or create a new one. So let’s choose an app and I’m going to choose our Accounts app. Notice these are just the Canvas apps. That’s all you got. Selection of and click on Add. Now you can see almost done, save your app in Powerappstudio to finalize the data connection.
So if I go to the data studio, so about to navigate to create Powerapps. com. So here it is. And after about 15 seconds it comes up and I’ll just go to File Save. So I’ll say wave power bi. So there we go and publish. So now if I go back, you can see that I can use my Canvas app. And it also says you can share the app so that others can view it in Power Bi.
So if I was to upload this now to the Power Bi service and then I allow people to use this, they’ve only got access to it if they have access to the Power app itself. So you need to ensure that people can actually use it.
So I can click on View Accounts and all the other functionality. So that is adding a Canvas app into the Power Bi desktop. Now, we can also create one from here or at least start that. And again, I’m going to create an Insert and Power apps. I’m going to add my data. Add as much data as you need. This will only be the data that your new Power app will have access to. It won’t have access to anything else.
And then select the right environment. And once you’ve done that, create new. So your app is going to open it. So click Open and here is the Power app. It will be completely empty except look at this. The computer is adding in a gallery.
So this is a gallery full of all of the invoices or expenses that we have included. And from then on, you can do things like saying, well, I want to have a title and a subtitle and I want to edit fields. And you can see the fields that we got access to are the account name and the account description. They’re the only ones that we allowed. So that is how you can create a brand new app from Power Bi. And it goes into the PowerApp studio.
So what I’m going to do now is I’m going to save this and I’m going to share it. So make sure you’re logged in. If you weren’t, you would have been asked to previously, because you need to actually be logged in to get access to PowerApps. So I’m going to publish this to Power Bi. My workspace. You can see I’ve already got such a data set and it will impact a report on the dashboard. So, yes, I’m going to say replace. So now it’s publishing it and it will give me the option to open it in the Power Bi service. So here it is, and here you can see the canvas app, right?
So how do we now put it onto a dashboard? Like, for instance, my new dashboard that we’ve set up previously? Well, we can hint it in. So I’m going to pin this to my existing dashboard, and there it is in my dashboard. And I can click on it to go back into the portal, or I can resize it and do whatever I want. So this is how we can embed canvas apps into Power Bi reports and dashboards. And if you were starting from a data set in the Power Bi service, then I could create a new report from scratch.
And there again, we have access to PowerApps. If you’re in Power Bi desktop, then you can insert Power apps, or you might be able to go to the visualizations and see Power apps. So a few stage process select fields, add an existing app or create a new one. And then you need to make sure that people have got access to it. And then when it’s on the Power Bi service, if you want to have it into a dashboard, then what you need to do is go to a report that’s got it and you can pin it.
8. Practice Activity Number 14 – The Solution
So how did you get on with this practice activity? So, first of all, I wanted you to create a bar chart based on the device table in the data verse. So the first thing I needed to do was get data from the data first, so I can click on any form of data verse I want. So I need the environment domain. So let’s go to that environment, go to the session details and there is our details. So in between the slashes. Don’t include the slashes. So I’ll just copy that and place it in here. Data connectivity mod import. Absolutely, that’s fine. Gets me all the data right at the beginning rather than having to make lots of requests for the updated data. And I want the device table and it has a prefix, so that’s the right one.
CRE 93 underscore device. And it’s got five entries, which is right. And you can see things that you might be familiar, like the original purchase value and so forth. So let’s load that. It will go in the right hand side here under fields. So first of all I want to create a bar chart. So once it’s finished loading, fields can be expanded. So I will click on a bar chart or even a column chart, either of those. And what I’m going to do is put in the date purchased in the axis well that we’ve got here. So date purchased, drag that in. And in terms of the value, I want the original purchase value so that’s this now it just shows a year at the moment. I can change this if I wanted to just see the individual dates like that.
Or alternatively I can drill through and expand so I can see years as well as months and days and that sort of thing. But we don’t need to go into that level of detail for this particular course. Next, I want a table. So I will create a table click away from this. If you click on the visualization, while you have got a visualization shown, then you will be creating that sort of visualization. It will be replaced. So I need to click away from it, click into another visualization. So a table one. So I want to show the device name, the serial number and also the current value.
And then I want to create a pie chart which shows the device type and the current value. So we’re not going for any of the more Power Bi unique ones. So pie charts we can use in the Power apps, for instance. So we’re not looking at maps or gauges or cards or anything like that, we’re just looking at some fairly standard visualizations here. So next I need to publish this to the Power Bi service. So this is actually three steps. First of all, I need to sign in.
So if you’re not already signed in, you would need to do so. So I’m signed into a different account. So I’m going to sign in to my power platform plan as opposed to the one that I use for power bi myself, right? So you can see I’m signed in. Then I need to save this because you can’t publish it without saving. So I’m going to call this power bi practice activity and then I can publish it.
So I need to decide what workspace I’m going to use now because I want to draw it into powerups later. I can’t use my workspace. So you’ll need to be on the pro or the premium license for this. So I will go into my other workspace. So here you can see it is publishing and then at the end it’s going to give me the opportunity just to open it straight away with a hyperlink.
So let’s open it there. So here it comes. And here it is. So this is technically a report, we might hold these things loosely, a dashboard, but it’s actually a report. So what I want to do is add the bar column chart and the pie chart to a new dashboard. So I click on the pin up here and I say I want this to go to a new dashboard. So this is my device dashboard. So I’ll pin that and then once that’s done, I want to add this to the same dashboard. So existing dashboard and the device dashboard. So I’ll pin that as well. So let’s go to the dashboard and you can see there are those two.
So now we’ve got that. The only thing we want to do is add this dashboard so it can be accessed in our model driven app. So let’s close these down and go back. Now I could go to the default solution, which is where our model driven app is currently, but I can’t add to it, I can’t import things, I can only export some things, or at least I’m given the opportunity to do that. So what I need to do is create a new solution. So this solution is going to be my device solution.
So I’ll select my existing publisher and create. So there is my devices. I’m going to add my existing model driven app into it, so the user and devices model. And I can also add a new power bi dashboard. But it isn’t add existing, it is new. So new dashboard, power bi embedded. So this is going to be my power bi devices dashboard. So it’s going to be an actual dashboard. But don’t forget, report is also called an embedded dashboard here. So it’s going to be in my other workspace, so I can’t use my workspace and it’s going to be the device dashboard. So let’s save that and there it is and publish all customizations. Now that it’s done that, let’s go into our model driven app. Let’s edit it, let’s go into dashboards deselect all, we don’t want to see any of these, but we do want to see the device’s dashboard.
So I can remove any entities that the computer has added. All I want is the device and user entity. I will save it and then publish it. Now I’m not going to play this yet. Oh, I’ve got two dashboards here. I must have another one selected. That’s why all of these tables keep coming up. So what I’m going to do next is I’m going to edit the site map. So I need to save those changes going to the site map and in devices, I’m going to add a new subare.
So this is going to be for dashboards and the default dashboard is going to be our new Power Bi dashboard. So there we go. Power bi devices. Dashboard. So we’re going to call this dashboard. So let’s save, save and close. I’m just going to do one change. So there we go. So now go save, publish. I can validate as well and play. So let’s go into devices and we can see a dashboard subaria. And when we click on that, we have the Power Bi devices dashboard.
And we’ve also got the options open in Power Bi. So in this section, we’ve had a look at creating our visualizations in Power Bi desktop and Power Bi service. And we’ve had a look at the differences between the two and how to import in Power Bi visuals. In the next section, what we’re going to do is look at AI builder. We’re looking at the artificial intelligence models. Please join me there.