Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
My web source has a dynamic date, I want it to always return today's date. I'm trying to create a work around to be able to refresh dynamic data in the cloud via BI but it's throwing back an error.
Code causing the issue (with example url https://www.website.com/data/date/date:2023-06-19😞
Source = Json.Document(Web.Contents("https://www.website.com/data/date"),
[RelativePath="date:"&(Date.ToText(DateTime.Date(DateTime.LocalNow()), "yyyy-MM-dd"))]),
You've closed the Web.Contents function too early. The closing bracket/parenthesis for that function needs to move like this
let
RelPath = "date:" & Date.ToText(DateTime.Date(DateTime.LocalNow()), "yyyy-MM-dd"),
Source = Json.Document(Web.Contents("https://www.website.com/data/date/" & RelPath))
in
Source
In addition, trying create a Relative path with a : will give you an other error, something about the URIString not being variable.
That's why I added a step before Source where the Relative Path is created and then that's appended directly to the URL
Regards
Phil
Proud to be a Super User!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 5 | |
| 5 | |
| 4 |