cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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
v-monli-msft
Community Support
Community Support

Hi @Anonymous ,

 

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.
Anonymous
Not applicable

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,713)