Power Query M code
let
Source = SharePoint.Tables("https://yourcompany.sharepoint.com/sites/YourSite", [ApiVersion = 15]),
YourList = Source{[Id = "YourListName"]}[Items]
in
YourList
Connects to a SharePoint list and loads its items as a table.
let
Source = SharePoint.Tables("https://yourcompany.sharepoint.com/sites/YourSite", [ApiVersion = 15]),
YourList = Source{[Id = "YourListName"]}[Items]
in
YourList
Replace the site URL and list name/ID with your own; SharePoint.Tables lists all available lists if you're not sure of the exact ID.
Browse all 145 snippets in the Power Query M Code Snippets, or search the library for something similar to Load a SharePoint List.