<?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 For-Loop in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/For-Loop/m-p/2126798#M48788</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;We want to pull data from an API using an empty query - unfortunately the API only provides the data per employee, but we want to have a large table with all employee data, so we are currently thinking about how to handle this.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;User ID:&lt;BR /&gt;sajnsonsa34sesr&lt;BR /&gt;woefefmwe5452&lt;BR /&gt;psdmcsado2353&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Empty query:&lt;BR /&gt;let&lt;BR /&gt;Source = Json.Document(Web.Contents("&lt;A href="https://api.XXXXXX.com/api/v2/company/[USER-ID" target="_blank"&gt;https://api.XXXXXX.com/api/v2/company/[USER-ID&lt;/A&gt;]" &amp;amp; ....&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Is it possible to build a for-loop to pull out all the data for individual employees based on the user IDs one by one? Or do we have to use python or something like this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---------------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="192401" data-lia-user-login="v-easonf-msft" class="lia-mention lia-mention-user"&gt;v-easonf-msft&lt;/a&gt;&amp;nbsp;do you maybe have an idea?&lt;/P&gt;</description>
    <pubDate>Mon, 11 Oct 2021 09:30:53 GMT</pubDate>
    <dc:creator>fheller98</dc:creator>
    <dc:date>2021-10-11T09:30:53Z</dc:date>
    <item>
      <title>For-Loop</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/For-Loop/m-p/2126798#M48788</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;We want to pull data from an API using an empty query - unfortunately the API only provides the data per employee, but we want to have a large table with all employee data, so we are currently thinking about how to handle this.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;User ID:&lt;BR /&gt;sajnsonsa34sesr&lt;BR /&gt;woefefmwe5452&lt;BR /&gt;psdmcsado2353&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Empty query:&lt;BR /&gt;let&lt;BR /&gt;Source = Json.Document(Web.Contents("&lt;A href="https://api.XXXXXX.com/api/v2/company/[USER-ID" target="_blank"&gt;https://api.XXXXXX.com/api/v2/company/[USER-ID&lt;/A&gt;]" &amp;amp; ....&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Is it possible to build a for-loop to pull out all the data for individual employees based on the user IDs one by one? Or do we have to use python or something like this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---------------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="192401" data-lia-user-login="v-easonf-msft" class="lia-mention lia-mention-user"&gt;v-easonf-msft&lt;/a&gt;&amp;nbsp;do you maybe have an idea?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 09:30:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/For-Loop/m-p/2126798#M48788</guid>
      <dc:creator>fheller98</dc:creator>
      <dc:date>2021-10-11T09:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: For-Loop</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/For-Loop/m-p/2127382#M48811</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="319234" data-lia-user-login="fheller98" class="lia-mention lia-mention-user"&gt;fheller98&lt;/a&gt; , refer if this similar blog can help&lt;/P&gt;
&lt;P&gt;&lt;A href="https://medium.com/@marktiedemann/how-to-do-pagination-in-power-query-430460c17c78" target="_blank"&gt;https://medium.com/@marktiedemann/how-to-do-pagination-in-power-query-430460c17c78&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 13:04:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/For-Loop/m-p/2127382#M48811</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-10-11T13:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: For-Loop</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/For-Loop/m-p/2127475#M48817</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;thanks for your fast answer. I think it is not going to help because there is one query which get divided into smaller queries, if i get it right.&lt;BR /&gt;&lt;BR /&gt;We need a loop for replacing some part of the url, then trigger again, then replacing etc.&lt;BR /&gt;Do you think this would work too?&lt;BR /&gt;&lt;BR /&gt;let&lt;BR /&gt;Source = Json.Document(Web.Contents("&lt;A href="https://api.XXXXX.com/api/v2/employees/" target="_blank"&gt;https://api.XXXXX.com/api/v2/employees/&lt;/A&gt;" &amp;amp; &lt;STRONG&gt;employeeId&lt;/STRONG&gt; &amp;amp; "/timetracking", [Headers=[Authorization = Authentification]])),&lt;BR /&gt;data = Source[data],&lt;BR /&gt;#"Converted to Table" = Table.FromList(data, Splitter.SplitByNothing(), null, null, ExtraValues.Error),&lt;BR /&gt;#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "employeeId", "projectId", "requestDate", "startTime", "endTime", "totalTimeInMinutes", "breakTimeInMinutes", "comment", "status", "categories"}, {"Column1.id", "Column1.employeeId", "Column1.projectId", "Column1.requestDate", "Column1.startTime", "Column1.endTime", "Column1.totalTimeInMinutes", "Column1.breakTimeInMinutes", "Column1.comment", "Column1.status", "Column1.categories"})&lt;BR /&gt;in&lt;BR /&gt;#"Expanded Column1"&lt;BR /&gt;&lt;BR /&gt;See the example and highlighted part. And we want to get the data for all employees in one query by replacing the employeeID again and again...&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Finn&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 14:05:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/For-Loop/m-p/2127475#M48817</guid>
      <dc:creator>fheller98</dc:creator>
      <dc:date>2021-10-11T14:05:59Z</dc:date>
    </item>
  </channel>
</rss>

