A power app directly inside the context of a power bi report pass fields from power bi data set to power apps and the power app then will go ahead and connect to our data source.
And perform update add and delete operations i will also show you how we can refresh the visuals of the power bi report directly from power apps so let's check.
It out in action power bi allows us to analyze or visualize our data we can create dashboards and reports by connecting to.
Any data source no matter where it lives on premises or in the cloud here i have a power bi report the data source for which is a sharepoint list the list is an issue tracking list.
That tracks issues that users report we can track the status of the issue and plug in the notes as these issues are closed now with power bi i was able to build a.
The number of issues per status per type and more power bi data sets are read only however what if i would like to write back data directly from power bi.
To my data source which in this case is a sharepoint list since power bi data sets are read only in order to write back from power bi we need to take the help of another.
Service of the power platform which is power apps with powerapps i can act on my data perform crud operations create read update and delete operations on my data.
Sources so let's try that out right here inside the power bi report itself by bringing in a power app visual i will edit my power bi report.
And from the visualizations we have a power apps visual for power bi i will add that visual the first step is to pass fields from the power bi data set to the power app.
Posts Related:
Which is living contextually inside the
Power bi report for my issue tracking data set that's connected in the power bi report these are all the fields that are being.Exposed from my sharepoint list the key thing here is to always pass the primary key of your tables in your data sets for sharepoint the primary key is the id.
Column so i'll go ahead and select that i would also like to pass some additional fields i will pick the priority.
The region the status the title and the type so i've selected my data points that i would like to pass from my power bi data set to my power app.
And the moment i do that the visual transforms itself and provides me two options to choose from i can either create a brand new power.
App or i can choose an existing powerapp in this scenario i will create a brand new powerapp and you can also select the environments in which you would like to.
Create these apps in i will build this in my default environment and i will go ahead and click on create new it will redirect me to the powerapps.
Studio experience wherein it will create a single screen power app that would have a gallery control which will have its data coming in from the.
Power bi data set here's the app that has got created i have a gallery here the items property for which is coming in from power bi integration.
Dot data
This object called power bi integration is a special object that gets created when you create the power app directly from.That power bi visual or you connect to an existing power app from that power bi visual for this gallery control the data is coming in from my power bi data set.
I have a label control here that is showcasing the id field that i passed from the power bi data set if i change this to this item dot it will list out all the fields that i.
Selected to pass from my power bi data set to my power app so if i pick title it will showcase the title of my issues.
And since this is a gallery control i can change the layout of this control and showcase additional information for example i'll select title subtitle and body as.
The layout here i have the title of the issue i will showcase the status of the issue the priority of the issue and since this is a power app i have.
Complete control over the ui of this canvas app let's go ahead and insert a simple label control and i've gone ahead and added some.
Simple formatting options to make this label control appear like a header for this app here i've added another label control to showcase the type information.
Once i have my landing screen built out i can go to file give my app a name and save this app so that this app gets saved and published to power apps.
Once that is done if i go ahead and close this browser tab and back to my power bi report i will go ahead and click save and refresh.
The web page the issue tracker appears showcasing all this information that is coming in from the power bi data set the beauty of this is.
If i was to filter my data in power bi the information showcased in the powerapp will also filter itself i'll apply a filter on the type property type.
2. the moment i select this if you observe the power app it only shows the issues related to type 2 let's add another filter show me all the issues that are type 2.
And the priority is low we can see how the power app is respecting the filter experience also if i was to filter information my report by selecting information on.
Certain visuals for example here i've selected north america so i've applied the filter here for the region north america and then within this i want to only look at the.
Issue 28 and 36. as i make these selections you can see how the power app is respecting those selections let's try and see how we can perform.
Crud operations on our data source directly from that power app once again i will edit the report since i want to make changes to my power app i will head over to the three ellipses.
Here and go to edit this will once again take me back to the powerapp studio experience here i want to create a screen which will allow the user to make updates.
Since the power bi data set is read only if i was to try and perform update operations on this data set i will receive an error stating that this data set is read-only.
However in powerapps i can go and connect directly to my data source so i'll head over to data go to add data and create a connection to the.
Sharepoint site and connect directly to my sharepoint list now i have my sharepoint list connected in my powered app.
I'll create a form based screen so the user can interact with the record in sharepoint and perform the write back operations and for that i will head over to new.
Screen we have a template called form i will select this here i have this edit form control that i.
Will rename to my issue tracker form the data source will be my issue tracking list.
That is connected directly in my power app this will list out all the columns in my data source i can head over to edit fields.
And choose the fields reorder them design the form based upon my use case for this form control there is an item property and this is the item or the record in.
Your data source that you want this form to load the information for and that will come directly from the selected item of the gallery on my home screen.
Now the gallery is getting its data from the power bi integration object the form is connected directly to my data source so the key thing to do here for the item.
Property is to perform a function here called lookup lookup returns a single record from a data source depending upon the condition that you define.