<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: API Pagination Help - List.Dates in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/API-Pagination-Help-List-Dates/m-p/2985702#M94530</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"List.Dates" needs three parameters but you provided four. Here is the &lt;A href="https://learn.microsoft.com/en-us/powerquery-m/list-dates" target="_self"&gt;document&lt;/A&gt; about this funtion.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Dec 2022 04:24:41 GMT</pubDate>
    <dc:creator>ChainsawMan</dc:creator>
    <dc:date>2022-12-23T04:24:41Z</dc:date>
    <item>
      <title>API Pagination Help - List.Dates</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/API-Pagination-Help-List-Dates/m-p/2982576#M94446</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am hoping someone knows a solution to this. I am trying to connect to a REST API that I need to paginate JSON data using date timestamps instead of page #s. Normally, the solution here is to use 'List.Generate' and create a loop of page numbers for the API call to use - as shown here in this &lt;A href="https://www.youtube.com/watch?v=05yhwnuCjRw" target="_self"&gt;video&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But since I need to loop through a list of dates instead of numbers, I need to use 'List.Dates' instead of 'List.Generate'. The problem I am running into is with my List.Dates query (see 'Query1' below). I should note that I am not attempting this in PowerBI but in Excel PowerQuery.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Function&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;= (Page as date)=&amp;gt;&lt;BR /&gt;let&lt;BR /&gt;Source = Json.Document(Web.Contents("&lt;A href="https://api-website.com//data/v1/available?key=000-001001A0A&amp;amp;lastModifiedStart=" target="_blank" rel="noopener"&gt;https://api-website.com//data/v1/available?key=000-001001A0A&amp;amp;lastModifiedStart=&lt;/A&gt;"&amp;amp;Date.ToText(Page,[Format="YYYY-MM-DD"]))),&lt;BR /&gt;#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),&lt;BR /&gt;#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"datacolumn1", "datacolumn2", "datacolumn3", "datacolumn4"})&lt;/P&gt;&lt;P&gt;in&lt;BR /&gt;#"Expanded Column1"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Query1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;= List.Dates(()=&amp;gt; [Result = try Function(#date(2022,1,1)) otherwise null, Page=#date(2022,1,1)],&lt;BR /&gt;each [Result]&amp;lt;&amp;gt;null, each [Result = try Function(Date.AddDays([Page],1)) otherwise null, Page=Date.AddDays([Page],1)],&lt;BR /&gt;each [Result])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Query1 returns the following error. Does anyone know what might be causing this? Really appreciate any help I can get here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Expression.Error: 4 arguments were passed to a function which expects 3.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Details:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Pattern=&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Arguments=[List]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 18:37:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/API-Pagination-Help-List-Dates/m-p/2982576#M94446</guid>
      <dc:creator>l0ganBI</dc:creator>
      <dc:date>2022-12-21T18:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: API Pagination Help - List.Dates</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/API-Pagination-Help-List-Dates/m-p/2985702#M94530</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"List.Dates" needs three parameters but you provided four. Here is the &lt;A href="https://learn.microsoft.com/en-us/powerquery-m/list-dates" target="_self"&gt;document&lt;/A&gt; about this funtion.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 04:24:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/API-Pagination-Help-List-Dates/m-p/2985702#M94530</guid>
      <dc:creator>ChainsawMan</dc:creator>
      <dc:date>2022-12-23T04:24:41Z</dc:date>
    </item>
  </channel>
</rss>

