cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Parzival2307
Level: Powered On

Save data from a Power BI sheet to a SharePointList using PowerApps

Hi All

 

I have a powerBI report and I have integrated a PowerApp in one of the sheets for this report.

I want to add a button to the PowerApp so that the selected rows from the PowerBI report can be saved to a SharePoint List.

Is this possible ?

 

I am able to read the selected rows from the report and display them in a gallery in powerApp by setting the items propert of the galley to 'PowerBIIntegration.Data'.

Do not know how to proceed further.

 

Any help is deeply appreciated.

Thanks In Advance !!

2 REPLIES 2
Community Support Team
Community Support Team

Re: Save data from a Power BI sheet to a SharePointList using PowerApps

Hi @Parzival2307 ,

 

You can use Patch to bulk update the data from gallery to SharePoint list. Generally, first collect the data from 'PowerBIIntegration.Data' to a collection, name it for example C1. Then use a formula similar to below to create new items to SharePoint list:

ForAll(C1,Patch(List,Defaults(List),{Title:Column1,...}))

Column1 is the column name in the collection. Notice that SharePoint list columns have different column types. So you have to make sure that the parameter suits the column types. For example, for a choice column, the formula should be:

{choice:
 {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
   Id:1,
  Value:"Valuehere"}

Regards,

Mona

 

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Parzival2307
Level: Powered On

Re: Save data from a Power BI sheet to a SharePointList using PowerApps

Hello Mona

 

Thanks a lot for your reply.

 

I have implemented the patch command but I am facing another issue.

I am getting certain columns from the powerBI report like Country,Master ID etc.

 

I am trying to save this info to a list called Project Details. My expression for that goes like : 

 

ForAll(PowerBIIntegration.Data,Patch('Project Details',Defaults('Project Details'),{Title:"title1",Country:Country,MasterID : 'Master ID'}))

 

Notice that the Master ID value being assigned is in quotes, that is how Powerapp is showing that column from powerBI but the Country value is not in quotes.

Not sure why the difference between these columns.

 

But as a result of this , the country value is getting saved in the List fine but the Master ID does not get saved.

 

Any idea what is the issue here ?

 

Any help/suggestion is greatly appreciated.

Thanks a Lot !!!!

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 375 members 4,779 guests
Please welcome our newest community members: