Forum Discussion

gschellhas's avatar
gschellhas
New Member
8 years ago

Gateway - Web Data - Will not work for dynamic url

I have a Queryset that will work fine in Power Bi Desktop however when I push to Power Bi Service, i reveive this message: You can't schedule refresh for this dataset because one or more sources currently don't support refresh.

 

I have tried back and forth many times and narrowed it down to adding a formula into the URL:

 

Json.Document(Web.Contents("https://na.myconnectwise.net/v2018_1/apis/3.0/service/tickets?conditions=board/name=""Help Desk"" AND closedDate<[" & Text.Combine(List.Transform(Record.FieldValues(Date.ToRecord(Date.From(DateTime.LocalNow()))), each Text.PadStart(Text.From(_), 2, "0")),"-") & "]"))

 

The full query is here:

let
    Source = Json.Document(Web.Contents("https://na.myconnectwise.net/v2018_1/apis/3.0/service/tickets?conditions=board/name=""Help Desk"" AND closedDate<[" & Text.Combine(List.Transform(Record.FieldValues(Date.ToRecord(Date.From(DateTime.LocalNow()))), each Text.PadStart(Text.From(_), 2, "0")),"-") & "]")),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id"}, {"Column1.id"})
in
    #"Expanded Column1"

 

My goal is to dynamically send the date into the request so I receive only back the dates that I want to show data for.  And and all help appriciated.