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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
pakot
Frequent Visitor

400 bad request

Hi,

I have following query in my pbix but when i try to close&apply changes I'm receiving bad 400 request:

 

let
Source = (VersionsRelevantSharePointListName as text, VersionsRelevantSharePointLocation as text, VersionsRelevantItemID as number) => let
Source = Xml.Tables(Web.Contents(
"https://xxx.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

 

I guess I need to add something to web contents but I'm not sure what would that be.

Thank you in advance for help!

2 REPLIES 2
Anonymous
Not applicable

Hi @pakot 

 

This query is a function. Have you tried providing values for the three parameters and invoking it? Will this return the 400 error?

vjingzhanmsft_0-1705546129252.png

 

Best regards,

Jing

Hi,

in the PowerQuery I can invoke this function but the moment I'm trying to close PowerQuery and apply changes to my PowerBI I'm receiving bad request error. I'm also wondering if this could be related to the authorization/security level of the SharePoint page (?).

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.