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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
MStile
Frequent Visitor

Using web source for incremental refresh

I am trying to use a web site which returns json as the source for a table and due to the amount of data am trying to implement incremental refresh.  I am attempting to use the string versions of the parameters (RangeStart and RangeEnd) in the command but I get a Token Comma Expected on the last like befor IN.  Can anyone point me to where I am wrong?

 

let
strRangeStart = DateTime.ToText(RangeStart,[Format="yyyy-MM-dd"]),
strRangeEnd = DateTime.ToText(RangeEnd,[Format="yyyy-MM-dd"]),
Source = Json.Document(Web.Contents("https://volt0328.attendanceondemand.com/mobile/mssrestba.aew/v1/employees/paydes/daily/detail?hyperQ... Employees&periodSel=custom&from=" & strRangeStart & "to=" & strRangeEnd & " [Timeout=#duration(0,0,30,0)]))"
in
Source

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @MStile 

 

You may try this. This doesn't have syntax error. 

let
strRangeStart = DateTime.ToText(RangeStart,[Format="yyyy-MM-dd"]),
strRangeEnd = DateTime.ToText(RangeEnd,[Format="yyyy-MM-dd"]),
Source = Json.Document(Web.Contents("https://volt0328.attendanceondemand.com/mobile/mssrestba.aew/v1/employees/paydes/daily/detail?hyperQ... Employees&periodSel=custom&from=" & strRangeStart & "&to=" & strRangeEnd, [Timeout=#duration(0,0,30,0)]))
in
Source

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @MStile 

 

You may try this. This doesn't have syntax error. 

let
strRangeStart = DateTime.ToText(RangeStart,[Format="yyyy-MM-dd"]),
strRangeEnd = DateTime.ToText(RangeEnd,[Format="yyyy-MM-dd"]),
Source = Json.Document(Web.Contents("https://volt0328.attendanceondemand.com/mobile/mssrestba.aew/v1/employees/paydes/daily/detail?hyperQ... Employees&periodSel=custom&from=" & strRangeStart & "&to=" & strRangeEnd, [Timeout=#duration(0,0,30,0)]))
in
Source

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

ppm1
Solution Sage
Solution Sage

Your approach should work. But you need to add the  "&" back in. Try this instead.

 

let
strRangeStart = DateTime.ToText(RangeStart,[Format="yyyy-MM-dd"]),
strRangeEnd = DateTime.ToText(RangeEnd,[Format="yyyy-MM-dd"]),
Source = Json.Document(Web.Contents("https://volt0328.attendanceondemand.com/mobile/mssrestba.aew/v1/employees/paydes/daily/detail?hyperQ... Employees&periodSel=custom&from=" & strRangeStart & "&to=" & strRangeEnd, [Timeout=#duration(0,0,30,0)]))"
in
Source

 

Pat

 

Microsoft Employee
MStile
Frequent Visitor

This would be the original code which works for retrieving data but not for incremental refresh

let
Source = Json.Document(Web.Contents("https://volt0328.attendanceondemand.com/mobile/mssrestba.aew/v1/" & "employees/paydes/daily/detail?hyperQuery=All Employees&" & "periodSel=custom&from=2018-01-02&to=2018-02-01", [Timeout=#duration(0, 0, 30, 0)])),

in

Source

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.