PowerApps to update and refresh data in Power BI Hands On Lab

 

Walking through how to refresh datasets and create near real time reports in Power BI with the PowerApps Custom Visual.

Starting from Power BI we need a report that is based on Direct Query. To save time you can download this report from here:

https://community.powerbi.com/oxcrx34285/attachments/oxcrx34285/DataStoriesGallery/3027/2/PowerApps_with_refresh.pbix

 

Upload the report to Power BI.com

 

  1. Please log into Power BI https://PowerBI.com using the supplied accounts i.e.

PAUser1@powermvps.comPAUser108@powermvps.com

Pass@word1

To save some steps the directions will just show doing this from “My Workspace” ….please remember “my workspace” is not really a recommended location.

  1. Select “Get Data” and then Files


  1. Select Local File and upload the PowerApps_with_refresh.pbix file from step #1

 

https://community.powerbi.com/oxcrx34285/attachments/oxcrx34285/DataStoriesGallery/3027/2/PowerApps_with_refresh.pbix

 

 

  1. Update the security for the report connection back to the SQL Server by clicking on the three dots after PowerApps_with_refresh Dataset.

    IF you don’t see the Datasets click on “My Workspace” to expand out the artifacts in the workspace. …this may require a couple of attempts!

 

IF you don’t see the Datasets click on “My Workspace” to expand out the artifacts in the workspace. …this may require a couple of attempts!

 

  1. To update the connection credentials, click on dataset settings, click on the “PoewrApps_with_refresh dataset and then select “Edit Credentials”.

 

  1. To configure the credentials to use the

    basic authentication method with the Username:

    Ann and password provided.

    Pass@word1

  1. Test the report that it is working!

     

 

  1. Edit the report to add the PowerApps Custom Visual

     

 

  1. Add the PowerApps Custom Visual to the report

 

  1. Add the custom visual to the report canvas

  1. Add all the fields to the Visual and specify we are building a new application and note the environment

  1. In the new form wizard specify to add a form

  1. Delete the default Gallery as it won’t be used. (note it is already populated with data from Power BI)

 

  1. Specify a Data source for the PowerApps form.

17. Specify the data source is a SQL Server source

18. Specify to use a new connection

 

19. Create a new SQL Connection

Supply the following Data for the connection String

Server: tcp:powerplatformdemos.database.windows.net

User: Ann

Password: See front of class

 

 

 

 

 

20. Specify to use the “Orders” Table

 

21. Select the fields property for the form.

 

22. Specify to use all the fields

23. Add Two Buttons

24. Set the OnSelect property to:

SubmitForm(Form1) ; PowerBIIntegration.Refresh()

Also Set the Text property to “Submit”

25. Set the onselect property of the first button to:

NewForm(Form1)

 

26. Save your application File > Save > Save (yes two of them!)

27. Test your application!!!!!!!!!!!!!!!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s