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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Paulyeo11
Impactful Individual
Impactful Individual

How to make sharepoint folder auto load new CSV file ?

Hi All 

I have create folder at sharepoint with 2 CSV file :-

Paulyeo11_0-1605241868732.png

I am able to load these 2 CSV file to PBI.

 

But when i add one more CSV file to sharepoint folder.  But the PBI will not automatic to load these 3 file to PBI. it still only load the 2 file to PBI. when i press refresh icon.

 

Any work around ?

 

Paul Yeo  

 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @Paulyeo11 

After the Source step, you need to filter the files by extension to only include CSV files.

filter-by-extension.png

Then a refresh will pick up any and all CSV files on Sharepoint.

The M code will look like this but you only need to use the GUI

 

Source = SharePoint.Files("https://365moth.sharepoint.com/sites/PGTWork", [ApiVersion = 15]),
    #"Filtered Rows" = Table.SelectRows(Source, each ([Extension] = ".csv"))

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

4 REPLIES 4
PhilipTreacy
Super User
Super User

Hi @Paulyeo11 

After the Source step, you need to filter the files by extension to only include CSV files.

filter-by-extension.png

Then a refresh will pick up any and all CSV files on Sharepoint.

The M code will look like this but you only need to use the GUI

 

Source = SharePoint.Files("https://365moth.sharepoint.com/sites/PGTWork", [ApiVersion = 15]),
    #"Filtered Rows" = Table.SelectRows(Source, each ([Extension] = ".csv"))

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi Phil

Thank you very much for sharing , i just found a new way , that is i create a special folder just for load GL data. it work fine

Hi Phil

Thank you very much for your help , i have follow your instruction by filter only load CSV file . But then due to my sharepoint have many CSV file , so i only select Book1.CSV till Book4.CSV file to load. otherwise it will load all CSV file , which is not what i need. and after sucessfully load all CSV 4 file to PBI , and when i add one more CSV file = Book5.CSV , it will not load the latest CSV file which is Book5.CSV. Any work around ?

Paulyeo11_0-1605248725461.png

 

amitchandak
Super User
Super User

@Paulyeo11 , refer if this can help. You need to do modification for sharepoint

https://wkrzywiec.medium.com/getting-data-from-the-latest-file-in-a-folder-using-power-query-51dfa4b...

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors