Forum Discussion
Using dynamic URL with OData.Feed
- 1 year ago
Hi nok
simialr issue :
looks like he Put the query pairs into the Query section, not the Relative path section. and got it sorted :https://community.fabric.microsoft.com/t5/Power-Query/Help-with-syntax-One-or-more-table-references-a-dynamic-Data/td-p/3134545
so adding only Relative path only is not sufficent it seems you will need to add the query section as well
check this arlticle as well :
Using OData.Feed And The Query Option To Avoid The Dynamic Data Sources Error In Power BI
so i'm guessing it must be something similar to this
let dateCurrentDay = DateTime.LocalNow(), dateTwoYearsAgo = Date.AddYears(dateCurrentDay, -2), dateFormat = DateTime.ToText(dateTwoYearsAgo, "yyyy-MM-ddTHH:mm:ss.99Z"), Source = OData.Feed( "https://api.myodata.com/xx/v7/TableRequest", null, [ Implementation = "2.0", Query = [#"@updatedDate" = "cast(" & dateFormat & ",Edm.DateTimeOffset)"] ] ) in Source
Hi nok
simialr issue :
looks like he Put the query pairs into the Query section, not the Relative path section. and got it sorted :https://community.fabric.microsoft.com/t5/Power-Query/Help-with-syntax-One-or-more-table-references-a-dynamic-Data/td-p/3134545
so adding only Relative path only is not sufficent it seems you will need to add the query section as well
check this arlticle as well :
Using OData.Feed And The Query Option To Avoid The Dynamic Data Sources Error In Power BI
so i'm guessing it must be something similar to this
let
dateCurrentDay = DateTime.LocalNow(),
dateTwoYearsAgo = Date.AddYears(dateCurrentDay, -2),
dateFormat = DateTime.ToText(dateTwoYearsAgo, "yyyy-MM-ddTHH:mm:ss.99Z"),
Source = OData.Feed(
"https://api.myodata.com/xx/v7/TableRequest",
null,
[
Implementation = "2.0",
Query = [#"@updatedDate" = "cast(" & dateFormat & ",Edm.DateTimeOffset)"]
]
)
in
Source