<?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 Power BI Pagination &amp;amp; Looping using List.Generate in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Pagination-amp-Looping-using-List-Generate/m-p/2383290#M34846</link>
    <description>&lt;P&gt;Hi everyone. I am posting again because could'nt find my solution.&lt;BR /&gt;&lt;STRONG&gt;ISSUE:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;URL:&amp;nbsp;&lt;A href="https://vcc-na4.8x8.com/api/stats/agents//agents/" target="_blank" rel="noopener nofollow noreferrer"&gt;https://vcc-na8.8x8.com/api/stats/agents//agents/&lt;/A&gt;&lt;STRONG&gt;{agent-id}&lt;/STRONG&gt;/activities?&lt;STRONG&gt;n={offset}&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;As you can see in above URL that I have to add agent id every single time and this API provides 50 rows per request.&lt;BR /&gt;&lt;STRONG&gt;NOTE: API does not provide any information on count etc&lt;/STRONG&gt;&lt;BR /&gt;With help of&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/226208" target="_blank" rel="noopener"&gt;@mahoneypat&lt;/A&gt;&amp;nbsp; I was able to create a function which allows me to extract all id's along with the pagination, PFB,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;(id as text)=&amp;gt;&lt;/P&gt;&lt;P&gt;let&lt;/P&gt;&lt;P&gt;Source =&lt;BR /&gt;&lt;BR /&gt;List.Generate( ()=&amp;gt;[result = try Xml.Tables(Web.Contents("&lt;A href="https://vcc-na8.8x8.com/" target="_blank" rel="noopener nofollow noreferrer"&gt;https://vcc-na8.8x8.com&lt;/A&gt;",[RelativePath="/api/stats/agents/"&amp;amp;(id)&amp;amp;"/activities?n=1"])) otherwise null, n=1],&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;each [result]&amp;lt;&amp;gt; null,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;each [result = try Xml.Tables(Web.Contents("&lt;A href="https://vcc-na8.8x8.com/" target="_blank" rel="noopener nofollow noreferrer"&gt;https://vcc-na8.8x8.com&lt;/A&gt;",[RelativePath="/api/stats/agents/"&amp;amp;(id)&amp;amp;"/activities?n="&amp;amp;Number.ToText([n]+50)])) otherwise null, n=[n]+50],&lt;/P&gt;&lt;P&gt;each [result])&lt;/P&gt;&lt;P&gt;in&lt;/P&gt;&lt;P&gt;Source&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Issue with the function:&lt;BR /&gt;1.Function is providing infinite tables. it is on constant loop I think.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. When i try to invoke this function with Agent id's from new table it only formats the table with the first ID which is empty and provides null values.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;3. It is on constant load. does'nt do anything.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PFB the link to my video which i have created for the better understanding. It will save your time to provide the solution.&lt;BR /&gt;&lt;BR /&gt;Link:&amp;nbsp;&lt;A href="https://drive.google.com/file/d/1xbASl1EaziV3qp1ptZlzCtA-fbXnbJ3R/view?usp=sharing" target="_blank" rel="noopener nofollow noreferrer"&gt;https://drive.google.com/file/d/1xbASl1EaziV3qp1ptZlzCtA-fbXnbJ3R/view?usp=sharing&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;API Documentation:&amp;nbsp;&lt;A href="https://support.8x8.com/cloud-contact-center/virtual-contact-center/developers/8x8-contact-center-statistics-reporting-api#Activities" target="_blank" rel="noopener nofollow noreferrer"&gt;https://support.8x8.com/cloud-contact-center/virtual-contact-center/developers/8x8-contact-center-st...&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Requirment: Looking for a function which provides all the id's with all the rows(Pagination).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Really looking forward for someone's help.&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Saad.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Mar 2022 10:30:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-03-09T10:30:31Z</dc:date>
    <item>
      <title>Power BI Pagination &amp; Looping using List.Generate</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Pagination-amp-Looping-using-List-Generate/m-p/2383290#M34846</link>
      <description>&lt;P&gt;Hi everyone. I am posting again because could'nt find my solution.&lt;BR /&gt;&lt;STRONG&gt;ISSUE:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;URL:&amp;nbsp;&lt;A href="https://vcc-na4.8x8.com/api/stats/agents//agents/" target="_blank" rel="noopener nofollow noreferrer"&gt;https://vcc-na8.8x8.com/api/stats/agents//agents/&lt;/A&gt;&lt;STRONG&gt;{agent-id}&lt;/STRONG&gt;/activities?&lt;STRONG&gt;n={offset}&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;As you can see in above URL that I have to add agent id every single time and this API provides 50 rows per request.&lt;BR /&gt;&lt;STRONG&gt;NOTE: API does not provide any information on count etc&lt;/STRONG&gt;&lt;BR /&gt;With help of&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/226208" target="_blank" rel="noopener"&gt;@mahoneypat&lt;/A&gt;&amp;nbsp; I was able to create a function which allows me to extract all id's along with the pagination, PFB,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;(id as text)=&amp;gt;&lt;/P&gt;&lt;P&gt;let&lt;/P&gt;&lt;P&gt;Source =&lt;BR /&gt;&lt;BR /&gt;List.Generate( ()=&amp;gt;[result = try Xml.Tables(Web.Contents("&lt;A href="https://vcc-na8.8x8.com/" target="_blank" rel="noopener nofollow noreferrer"&gt;https://vcc-na8.8x8.com&lt;/A&gt;",[RelativePath="/api/stats/agents/"&amp;amp;(id)&amp;amp;"/activities?n=1"])) otherwise null, n=1],&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;each [result]&amp;lt;&amp;gt; null,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;each [result = try Xml.Tables(Web.Contents("&lt;A href="https://vcc-na8.8x8.com/" target="_blank" rel="noopener nofollow noreferrer"&gt;https://vcc-na8.8x8.com&lt;/A&gt;",[RelativePath="/api/stats/agents/"&amp;amp;(id)&amp;amp;"/activities?n="&amp;amp;Number.ToText([n]+50)])) otherwise null, n=[n]+50],&lt;/P&gt;&lt;P&gt;each [result])&lt;/P&gt;&lt;P&gt;in&lt;/P&gt;&lt;P&gt;Source&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Issue with the function:&lt;BR /&gt;1.Function is providing infinite tables. it is on constant loop I think.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. When i try to invoke this function with Agent id's from new table it only formats the table with the first ID which is empty and provides null values.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;3. It is on constant load. does'nt do anything.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PFB the link to my video which i have created for the better understanding. It will save your time to provide the solution.&lt;BR /&gt;&lt;BR /&gt;Link:&amp;nbsp;&lt;A href="https://drive.google.com/file/d/1xbASl1EaziV3qp1ptZlzCtA-fbXnbJ3R/view?usp=sharing" target="_blank" rel="noopener nofollow noreferrer"&gt;https://drive.google.com/file/d/1xbASl1EaziV3qp1ptZlzCtA-fbXnbJ3R/view?usp=sharing&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;API Documentation:&amp;nbsp;&lt;A href="https://support.8x8.com/cloud-contact-center/virtual-contact-center/developers/8x8-contact-center-statistics-reporting-api#Activities" target="_blank" rel="noopener nofollow noreferrer"&gt;https://support.8x8.com/cloud-contact-center/virtual-contact-center/developers/8x8-contact-center-st...&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Requirment: Looking for a function which provides all the id's with all the rows(Pagination).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Really looking forward for someone's help.&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Saad.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 10:30:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Pagination-amp-Looping-using-List-Generate/m-p/2383290#M34846</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-09T10:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Pagination &amp; Looping using List.Generate</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Pagination-amp-Looping-using-List-Generate/m-p/2391457#M34942</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;After watching the videos and formulas you provided many times, it is difficult to find out the specific issue. Unfortunately, I can't go deep into the issue because of the website needs to log in and cannot be registered, this may involve your privacy information. It is recommended that you &lt;A href="https://powerbi.microsoft.com/en-us/support/" target="_self"&gt;create a support ticket&lt;/A&gt; for further help.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-create-a-support-ticket-in-Power-BI/ba-p/683031" target="_self"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-create-a-support-ticket-in-Power-BI/ba-p/683031&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Liang&lt;BR /&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 07:36:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Pagination-amp-Looping-using-List-Generate/m-p/2391457#M34942</guid>
      <dc:creator>V-lianl-msft</dc:creator>
      <dc:date>2022-03-14T07:36:09Z</dc:date>
    </item>
  </channel>
</rss>

