<?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: Merge data from SQL query and resident Table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Merge-data-from-SQL-query-and-resident-Table/m-p/1843080#M69783</link>
    <description>&lt;P&gt;Hi Marcus, it did work perfectly!!&lt;/P&gt;&lt;P&gt;Many TKS!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Oct 2021 15:59:46 GMT</pubDate>
    <dc:creator>oscarvictory</dc:creator>
    <dc:date>2021-10-06T15:59:46Z</dc:date>
    <item>
      <title>Merge data from SQL query and resident Table</title>
      <link>https://community.qlik.com/t5/App-Development/Merge-data-from-SQL-query-and-resident-Table/m-p/1843024#M69779</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;Hope you can help me. I have data from SQL plus ficticious data to create a forcasted analysis on future consumption.&lt;/P&gt;&lt;P&gt;Here is my code (Up to 1000 Employees and 10 departments):&lt;/P&gt;&lt;P&gt;Table1:&lt;BR /&gt;SELECT Employee, Consumption, Department, Month&lt;BR /&gt;from SQLTableName1;&lt;/P&gt;&lt;P&gt;tempmaxmonth:&lt;BR /&gt;load&lt;BR /&gt;max(Month) as maxmonth&lt;BR /&gt;resident Table1;&lt;/P&gt;&lt;P&gt;let vmaxmonth = Peek(‘maxmonth’, 0, tempmaxmonth);&lt;BR /&gt;let vforecastmonth = $(vmaxmonth) + 3;&lt;BR /&gt;drop Table tempmaxmonth;&lt;/P&gt;&lt;P&gt;Table1:&lt;BR /&gt;load * ;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;tempmonth:&lt;BR /&gt;Load $(vmaxmonth)+IterNo() as Month&lt;BR /&gt;AutoGenerate(1)&lt;BR /&gt;While $(vmaxmonth)+IterNo()&amp;lt;=$(vforecastmonth) and $(vmaxmonth)+IterNo() &amp;lt; 13&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table1.jpg" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/63555i10DEAC255EBF9F88/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Table1.jpg" alt="Table1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is what I would like:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table2.jpg" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/63556i941F42D2EDB3CF81/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Table2.jpg" alt="Table2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Question is that I don't get the point on how to finally link real SQL data with future months.&lt;/P&gt;&lt;P&gt;Many TKS!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 14:56:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Merge-data-from-SQL-query-and-resident-Table/m-p/1843024#M69779</guid>
      <dc:creator>oscarvictory</dc:creator>
      <dc:date>2021-10-06T14:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Merge data from SQL query and resident Table</title>
      <link>https://community.qlik.com/t5/App-Development/Merge-data-from-SQL-query-and-resident-Table/m-p/1843051#M69782</link>
      <description>&lt;P&gt;Your concatenate is too early because at this moment you have just generated the rest months of the year but there aren't any data from your employees. I think I would do it in this way:&lt;/P&gt;&lt;P&gt;Table1: select ...&lt;BR /&gt;&lt;SPAN&gt;tempmaxmonth: load ...&lt;BR /&gt;tempmonth: ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;join(tempmonth)&lt;BR /&gt;load distinct Employee, Department, 0 as Consumption resident Table1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;concatenate(Table1)&lt;BR /&gt;load * resident tempmonth;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Marcus&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 15:19:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Merge-data-from-SQL-query-and-resident-Table/m-p/1843051#M69782</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-10-06T15:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: Merge data from SQL query and resident Table</title>
      <link>https://community.qlik.com/t5/App-Development/Merge-data-from-SQL-query-and-resident-Table/m-p/1843080#M69783</link>
      <description>&lt;P&gt;Hi Marcus, it did work perfectly!!&lt;/P&gt;&lt;P&gt;Many TKS!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 15:59:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Merge-data-from-SQL-query-and-resident-Table/m-p/1843080#M69783</guid>
      <dc:creator>oscarvictory</dc:creator>
      <dc:date>2021-10-06T15:59:46Z</dc:date>
    </item>
  </channel>
</rss>

