Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

PowerApps attachments as datasource

Hi all

 

I have been working on a project where we want to combine the Input from PowerApps with Power BI's reporting.

 

The problem I am currently encountering is using Excel workbooks of type .xlsx that were uploaded using PowerApps as a datasource for Power BI.

 

Since these files are uploaded into SharePoint, I thought of pointing to the list containing these uploads and it returned to site URL for downloading the file.

 

AndreM_0-1606806094656.png

 

Is there some way to use this URL  - or any alternative - to connect to the uploaded worksheets using Power Query?

1 ACCEPTED SOLUTION
Jimmy801
Community Champion
Community Champion

Hello @Anonymous 

 

I think it should work like this

Excel.Workbook(Web.Contents(YOURPATHFROMPOWERAPP))


If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

View solution in original post

6 REPLIES 6
Jimmy801
Community Champion
Community Champion

Hello @Anonymous 

 

I think it should work like this

Excel.Workbook(Web.Contents(YOURPATHFROMPOWERAPP))


If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

Anonymous
Not applicable

Thanks @Jimmy801 this seems to work for pointing to a single file.

 

Do you have any suggestions on how I can append the data of multiple files like they are stored in my example?

 

I tried playing around with the SharePoint.Contents and SharePoint.Files data access functions, but with no success.

Hello @Anonymous 

 

I'm not an expert, but I think there is a difference in Sharepoint and Sharepoint online. And It could also be that your administrator somehow blocked the access of streaming services like Power BI. How I said, I'm not an expert.

I've tried with this function, and it works

= SharePoint.Contents("YOUSHAREPOINT", [ApiVersion = 15])


If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

Anonymous
Not applicable

I went and tried using parameters with what you suggested. So far it seems like progress in the right direction.

 

I created a funtion that I can use in conjunction with a table containing the second portion of the URL (like in the original example) where each file is uploaded

 

 

(parPath as any) =>

let
    Source = Excel.Workbook(Web.Contents("https://company.sharepoint.com" & parPath))
in
    Source

 

 

 I then created a new query which is supposed to call the funtion and return a table of tables containing the data of each file. Following this guide.

 

 

let
    Source = Paths,
    path_name = Table.ToList(Table.SelectColumns(Source, "ShortPath")),
    file_path = List.Transform(path_name, each get_path(_))
in
    file_path

 

 

My only problem now is I am getting an error I do not quite understand and suspect that you might be right about the blocked access.

error.jpg

Hello @Anonymous 

 

include the function in your query or deactivate the firewall of power BI

 

BR

 

Jimmy

Anonymous
Not applicable

Hi @Jimmy801 

 

Good news, including the funtion in my query did the trick. I also replace Source = Paths with the full referenced query.

 

Thanks for the help.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors