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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
s-roberts
Helper I
Helper I

Cannot refresh dataset since dynamic data sources aren't refreshed. source is sharepoint list

We need to report the sharepoint list version history in PowerBI.

 

Chris Webb's BI Blog: Using The RelativePath And Query Options With Web.Contents() In Power Query An...

 

Using Criss Webb's blog post i did manage to impor the data into the PoweBI desktop, and elimenate the dynamic datasource error in the Data Source settings, when refreshing in PBI Service. 

 

I now have a valid web source connector in PowerBI desktop, that reads the version history of each item of a sharepoint list.

This all works in the PBI Desktop but again, there's an error in the PBI service when I try to refresh. 

It does not accept my sharepoint credentials to authentcate. 

 

Is there a working method to fetch sharepoint list history in PBI with the ability to refresh in the service??

 

Thanks

 

 

 

 

 

1 ACCEPTED SOLUTION
s-roberts
Helper I
Helper I

Got it to work. This is my function: 

 

let
Source = (VersionsRelevantItemID as number) => let
VRI = Text.From(VersionsRelevantItemID),
END_PATH = Text.Combine({"items(", VRI, ")/versions"}),
Source = Xml.Tables(Web.Contents(
"https://#####.sharepoint.com/sites/###/_api/web/Lists/getbytitle('sharepointlistname')", [RelativePath = END_PATH])),
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

View solution in original post

4 REPLIES 4
s-roberts
Helper I
Helper I

Got it to work. This is my function: 

 

let
Source = (VersionsRelevantItemID as number) => let
VRI = Text.From(VersionsRelevantItemID),
END_PATH = Text.Combine({"items(", VRI, ")/versions"}),
Source = Xml.Tables(Web.Contents(
"https://#####.sharepoint.com/sites/###/_api/web/Lists/getbytitle('sharepointlistname')", [RelativePath = END_PATH])),
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

Thanks. This solution has helped me.

GilbertQ
Super User
Super User

Hi @s-roberts 

 

Do you get this error in the power BI Service?

 

I have used Chris Webb method in the past and it has worked.

 

What is the URL that you are trying to use?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

In the PBI Service, the web connector does not authenticate. It should be the same credentials as for the sharepoint connectors. 

 

s-roberts_0-1616504082229.png

 

This is my function: 

let

    Source = (Path) =>

    let

    Host = "https://#####.sharepoint.com/sites/ProgramProcess",

        Source = Xml.Tables(Web.Contents( Host, [RelativePath = Path])),

            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

 

The Path variable is generated in another query of PCO list items. 

each Path would look like this:  /_api/web/Lists/getbytitle('PCO List')/items(###)/versions

 

Thanks for your help

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors