cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Community Support

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.
Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,534)