The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
My API has hardcoded dates in the URL. How could i update this where "todate" is today?
= Json.Document(Web.Contents("https://v9.footfallcam.com/FootfallCam/exportData?infoJson={""cat"":""0"",""id"":[""-1"",""30247"",""37499"",""30754"",""32500"",""33899"",""33829""],""data"":[],""fromdate"":""15/02/2024"",""todate"":""20/02/2024"",""period"":""1"",""dateformat"":""dd/MM/yyyy""}&access_token=480030004500680041006C00640055003300420047004E006F004C00640044005A00560043007100580067007000660075006B00490051003200550033005900760052006F0075002F007200770030005A0053002F0079003700590068004200420045003700430071007700…….”))
I have tried the following, with the posts on this community:
= Json.Document(Web.Contents("https://v9.footfallcam.com/FootfallCam/exportData?infoJson={""cat"":""0"",""id"":[""-1"",""30247"",""37499"",""30754"",""32500"",""33899"",""33829""],""data"":[],""fromdate"":""01/01/2023"",""todate"":""" & DateTime.ToText(DateTime.LocalNow(), "dd/MM/yyyy") & """,""period"":""1"",""dateformat"":""dd/MM/yyyy""}&access_token=480030004500680041006C00640055003300420047004E006F004C00640044005A00560043007100580067007000660075006B00490051003200550033005900760052006F0075002F007200770030005A0053002F0079003700……"""))
However, this wound work because PowerBI gives me an error:
(500): Internal Server Error
Details:
DataSourceKind=Web
DataSourcePath=https://v9.footfallcam.com/FootfallCam/exportData
When changing the date 20/02/2024, to today 22/02/2024, the data will load, however is the an option to automate this?
I believe there is! Could you help?
""" & DateTime.ToText(DateTime.LocalNow(), "dd/MM/yyyy") & """
SHOULD BECOME
"& DateTime.ToText(DateTime.LocalNow(), "dd/MM/yyyy") &"
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.