Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
nsimonov
Regular Visitor

I can't make schedule with parameters query

Hello!

I Need Help.

 

I have the next code:

let
TextString = "https://fornex.com/api/vps_stat/34-172757/cpu/2017-09-09--2017-09-10.json?apikey=xxxxxx",
Source = Json.Document(Web.Contents(TextString))
in
Source

 

The settings for automate update in PowerBI Web interface is ok.

 

But, if I change TextString to use of variables, I have a Error: You can not schedule an update for this dataset because one data source or more than one does not currently support the update.

 

Here it is:

let
date = #date(2017,9,9),
TextString = "https://fornex.com/api/vps_stat/34-172757/cpu/" & Date.ToText(date, "yyyy-MM-dd") & "--" & Date.ToText(date + #duration(1,0,0,0), "yyyy-MM-dd") & ".json?apikey=xxxxxx",
Source = Json.Document(Web.Contents(TextString))
in
Source

 

How I can to resolve this problem?

 

1 ACCEPTED SOLUTION

Thank you!

It helps me to resolve my problem.

All works is right.

Problem resolve in a RelativePath

 

This is url to wonderful solution: https://blog.crossjoin.co.uk/2016/08/16/using-the-relativepath-and-query-options-with-web-contents-i...

 

This is my workin code:

let
date = #date(2017,9,9),
TextString = "/api/vps_stat/34-172757/cpu/" & Date.ToText(date, "yyyy-MM-dd") & "--" & Date.ToText(date + #duration(1,0,0,0), "yyyy-MM-dd") & ".json",
Source = Json.Document(Web.Contents(
"https://fornex.com",
[
     RelativePath=TextString,
     Query=
        [
             apikey="xxx"
       ]
]
))
in
    Source

View solution in original post

2 REPLIES 2
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @nsimonov,

 

I find out some posts that have the same issue. There are solutions in these posts. Please check it out if they can solve your problem.

Web-Contents-is-not-working-with-Scheduled-Refresh-BUG

https://msdn.microsoft.com/en-us/library/mt260892.aspx

Can-t-schedule-a-refresh-for-Web-data-matching-a-function-with-a

Refreshing-queries-with-functions-doens-t-work

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you!

It helps me to resolve my problem.

All works is right.

Problem resolve in a RelativePath

 

This is url to wonderful solution: https://blog.crossjoin.co.uk/2016/08/16/using-the-relativepath-and-query-options-with-web-contents-i...

 

This is my workin code:

let
date = #date(2017,9,9),
TextString = "/api/vps_stat/34-172757/cpu/" & Date.ToText(date, "yyyy-MM-dd") & "--" & Date.ToText(date + #duration(1,0,0,0), "yyyy-MM-dd") & ".json",
Source = Json.Document(Web.Contents(
"https://fornex.com",
[
     RelativePath=TextString,
     Query=
        [
             apikey="xxx"
       ]
]
))
in
    Source

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.