Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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") &"
Check out the July 2025 Power BI update to learn about new features.