Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sulaya86/6da4742fc3abb17228232c50faf7e43b to your computer and use it in GitHub Desktop.
Save sulaya86/6da4742fc3abb17228232c50faf7e43b to your computer and use it in GitHub Desktop.
M Query Snippets (Power BI)
let
Source = SharePoint.Files("https://yourdomain.sharepoint.com/sites/<yoursitename>/", [ApiVersion = 15]),
#"Filtered rows 1" = Table.SelectRows(Source, each Text.Contains([Folder Path], "<FolderName>/csv")),
#"StepOne" = Table.AddColumn(#"Filtered rows 1", "tables", each Table.PromoteHeaders(Csv.Document([Content],[Delimiter=",",Encoding=1252, QuoteStyle=QuoteStyle.None]))),
#"StepTwo" = Table.SelectColumns(#"StepOne", {"Name", "tables"}),
allCSV=Table.Combine(#"StepTwo"[tables])
in
allCSV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment