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
latingraduate07
Frequent Visitor

Accessing multiple files in our organizational SharePoint site

I have several reports that require analysis for monthly audit purposes. The 9 files are located in our organization sharepoint site and all are formatted differently. All files need to combined into one file to conduct analysis via vlookup to different files--each file is generated and formatted individually for combining purposes.

There is one sheet in each file but they have specific sheet names (don't know if this matters).

All files are located in a path similar to this, however, the month's scope would be different (which is what I was hoping can create a parameter for it to grab upon editing the table with respective month's scope):

 

https://ORGNAME.sharepoint.com/sites/TEAM'S GRP NAME/Shared%20Documents/2.%20Performed%20Controls/ARC%20-%20JE/FY23/GA-4/07-July%202022/C-SAP/Raw%20Data/FILE1 NAME.xlsx

 

I would like to create a parameter that grabs the file path from a table RATHER than having to update each of the individually uploaded file's path. Also, the final combined table query is around 350K lines and fails every time right at 349K lines of retrieving data (so frustrating as it takes around 25 minutes to refresh).

 

Any assistance would be greatly appreciated as I've watched several tutorials and am unable to figure for a solution.

Thank you!

latingraduate07_0-1670350142446.png

 

2 REPLIES 2
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

Hi @latingraduate07 - you could consider starting with the following:

 

Source = SharePoint.Files( "https://ORGNAME.sharepoint.com/sites/TEAM'S GRP NAME" , [ApiVersion=15])

 

You will be represented with Table contain all the files in SharePoint.   You can now apply filters to the FolderPath and FileName columns to select the individual file.  Note this approach remove any Credential issues because access will be based on the SharePoint site rather than individual Excel file.

 

Filter = Table.SelectRows(Source, each Text.Contains( [FolderPath] , "ABC" ) and [FileName] = "xyx")

 

Use the Excel Workbook to open the Binary Filter.

 

OpenFile = Excel.Workbook(Filter)

 

It sounds like you need to find the relevant tables or sheets from each file rather than combinse.  But you should be able to use the Power Query to create a Reference or Duplicate query from the above steps.

 

Once you are happy, you may consider changing these into functions, so that you can combined multiples file across several months by removing the folder filter or use a parameter to change the month.

Thank you so much for your response, however, I am a new Power Query user and have pretty much self taught via youtube videos.  I am not familiar with your solution ( I apologize).  If you are able to provide a step by step process, It would be greatly appreciated!

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