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
Hi all,
in the past we have used a Query to a web.content. This query gets a value from a funktion (dynamic Start Date). This worked well until a few weeks ago. Here the Query:
= Json.Document(Web.Contents("http://www.myexample.com?P_WERK=[{'SIGN':'I','OPTION':'EQ', 'LOW':'CWMA'}]&P_DAT=[{'SIGN':'I','OPTION':'BT', 'LOW':'" & fktGetStartDate(10) & "','HIGH':'20211201'}]"))
Currently this is not possible (MS Documentation - dynamic data sources ).
How can I use a dynamic Date calculation in my Query?
Kind Regards,
Torsten
Solved! Go to Solution.
Hi. First of all, not all the scenarios of dynamic sources can be solved. Now, let's give it shot with this one. The most important thing with web content is the way the URL is built. We need to explain the engine that the source is only the first part of the URL in order to explain that all the requests are from the same source. Otherwise it thinks that each request is a different one and can't solve it.
Because of that you can use RelativePath and Query arguments to help you build the whole URL. Please check this example from the best, Chris Webb: https://blog.crossjoin.co.uk/2016/08/16/using-the-relativepath-and-query-options-with-web-contents-i...
It explains how to cut your URL and set the RelativePath and the Query for the arguments (Values after ? in links).
Once you change that, you will see if the dynamic query can be refreshed in Power Bi checking the data source settings. It should only have one item with the main URL.
I hope that helps,
Happy to help!
Hi. First of all, not all the scenarios of dynamic sources can be solved. Now, let's give it shot with this one. The most important thing with web content is the way the URL is built. We need to explain the engine that the source is only the first part of the URL in order to explain that all the requests are from the same source. Otherwise it thinks that each request is a different one and can't solve it.
Because of that you can use RelativePath and Query arguments to help you build the whole URL. Please check this example from the best, Chris Webb: https://blog.crossjoin.co.uk/2016/08/16/using-the-relativepath-and-query-options-with-web-contents-i...
It explains how to cut your URL and set the RelativePath and the Query for the arguments (Values after ? in links).
Once you change that, you will see if the dynamic query can be refreshed in Power Bi checking the data source settings. It should only have one item with the main URL.
I hope that helps,
Happy to help!
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.
| User | Count |
|---|---|
| 11 | |
| 11 | |
| 9 | |
| 8 | |
| 8 |