Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to make sharepoint folder auto load new CSV file ?

Hi All  I have create folder at sharepoint with 2 CSV file :- 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 autom...
  • PhilipTreacy's avatar
    5 years ago

    Hi Anonymous 

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

    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