Forum Discussion
AI14
3 years agoHelper III
Dynamically Change date range of web source (api link)
Im new to powerquery and have made a connection to a site using APi key. im trying to avoid going into the source every day to look at yesterdays data or any previous day. how can i do this dynamic...
- 3 years ago
AI14You need to include to and from in double quotes .... & "from=" & DateParameter & "to=" & DateParameter & ....
AntrikshSharma
3 years agoCommunity Champion
AI14 You want a single day's data? You can replace those dates with this:
= Date.ToText (
Date.From (
DateTime.LocalNow ( )
),
[Format = "yyyy-MM-dd", Culture = "en-US"]
)
- AI143 years agoHelper III
Thanks,
could this also be done if i set it yesterday instead of today?
also is it possible to have it linked to a cell where dat is entered?
- AntrikshSharma3 years agoCommunity Champion
AI14 Are you using Excel for this? Then you can create a new query from a particular cell and then reference that query in the above code.
- AI143 years agoHelper III
yes i am, sorry i didnt mention it.