Forum Discussion
Nick
10 years agoFrequent Visitor
Getting SharePoint List items with full history version?
Hi, We do have a SharePoint list to manage Fleet inventory of asset: mainly their attribution (who own it) and their status (active, lost, broken, etc.). We did activated the SharePoint Version ...
mzzwtr
4 years agoRegular Visitor
Hi Anonymous,
I suggest you to read these articles:
- Setting a scheduled refresh on a Dynamic Data Source in Power BI
- Web.Contents(), M Functions And Dataset Refresh Errors In Power BI
- Using The RelativePath And Query Options With Web.Contents() In Power Query And Power BI M Code
To set a scheduled refresh using dynamic data source, I've edit the function of JensG in this way:
let
Source = (VersionsRelevantSharePointListName as text, VersionsRelevantSharePointLocation as text, VersionsRelevantItemID as number) => let
Source = Xml.Tables(Web.Contents(
"https://YourAddress.sharepoint.com/sites/",
[RelativePath = VersionsRelevantSharePointLocation & "/_api/web/Lists/getbytitle('" & VersionsRelevantSharePointListName & "')/items(" & Text.From(VersionsRelevantItemID) & ")/versions"]
)),
entry = Source{0}[entry],
#"Removed Other Columns2" = Table.SelectColumns(entry,{"content"}),
#"Expanded content" = Table.ExpandTableColumn(#"Removed Other Columns2", "content", {"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"}, {"content"}),
#"Expanded content1" = Table.ExpandTableColumn(#"Expanded content", "content", {"properties"}, {"properties"}),
#"Expanded properties" = Table.ExpandTableColumn(#"Expanded content1", "properties", {"http://schemas.microsoft.com/ado/2007/08/dataservices"}, {"properties"})
in
#"Expanded properties"
in
Source
3 parameters are required for the function:
- VersionsRelevantSharePointLocation => The subdirectory of your SharePoint site (is what come after ...sites/)
- VersionsRelevantSharePointListName => Your SharePoint List Name
- VersionsRelevantItemID => SharePoint list item ID
Then, once you have published your report into Power BI service, I raccomend to read these articles:
- [Unable to combine data] accessing data sources that have privacy levels
- Information is needed in order to combine data
Hope this may help you.
Bye!