<?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: New table with values from another tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/New-table-with-values-from-another-tables/m-p/1719977#M723319</link>
    <description>&lt;P&gt;Is this what you are lookin for?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vegar_1-1592480175259.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/35785iF7970E2300BA1C1F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vegar_1-1592480175259.png" alt="Vegar_1-1592480175259.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;Main:
LOAD * INLINE [
Document, Dates, Quantity
Plan, 04.06, 10
Plan, 05.06, 10
Plan, 06.06, 0
]
;

LOAD * INLINE [
Document, Dates, Quantity
Order, 04.06, 0
Order, 05.06, 20
Order, 06.06, 20
];

LOAD * INLINE [
Document, Dates, Quantity
Shipped, 04.06, 0
Shipped, 05.06, 0
Shipped, 06.06, 30
];

Concatenate
LOAD
	'Forecast' as Document ,
	Dates, 
	Dates as TMPDates,
	Quantity
Resident Main
Where Document = 'Plan' and Quantity &amp;lt;&amp;gt; 0;

Concatenate 
LOAD 
	'Forecast' as Document ,
	Dates, 
	Dates as TMPDates,
	Quantity
Resident Main
Where Document = 'Order' and Quantity &amp;lt;&amp;gt; 0
AND NOT EXISTS (TMPDates, Dates);


Concatenate 
LOAD 
	'Forecast' as Document,
	Dates, 
	Dates as TMPDates,
	Quantity
Resident Main
Where Document = 'Shipped' and Quantity &amp;lt;&amp;gt; 0
AND NOT EXISTS (TMPDates, Dates);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jun 2020 11:36:46 GMT</pubDate>
    <dc:creator>Vegar</dc:creator>
    <dc:date>2020-06-18T11:36:46Z</dc:date>
    <item>
      <title>New table with values from another tables</title>
      <link>https://community.qlik.com/t5/QlikView/New-table-with-values-from-another-tables/m-p/1719924#M723316</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Hello, community.&lt;BR /&gt;I need to create a table with a Forecast sales, the quantity values of which are taken from existing tables - Plan, Order and Shipped.&lt;/P&gt;&lt;P&gt;Plan:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;Document, Dates, Quantity&lt;BR /&gt;Plan, 04.06, 10&lt;BR /&gt;Plan, 05.06, 10&lt;BR /&gt;Plan, 06.06, 0&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Order:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;Document, Dates, Quantity&lt;BR /&gt;Order, 04.06, 0&lt;BR /&gt;Order, 05.06, 20&lt;BR /&gt;Order, 06.06, 20&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Shipped:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;Document, Dates, Quantity&lt;BR /&gt;Shipped, 04.06, 0&lt;BR /&gt;Shipped, 05.06, 0&lt;BR /&gt;Shipped, 06.06, 30&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;STORE Main into C:\Temp\test.qvd(qvd);&lt;/P&gt;&lt;P&gt;Drop Table Main;&lt;/P&gt;&lt;P&gt;I tried to do this - concatenate these three tables and based on it create a table with forecast, applying the If-condition to the Quantity .&amp;nbsp;&lt;/P&gt;&lt;P&gt;Forecast:&lt;BR /&gt;LOAD&lt;BR /&gt;Date(Dates) as Dates,&lt;BR /&gt;If (Document = 'Plan' and Quantity &amp;gt; 0, Quantity,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; If (Document = 'Order' and Quantity &amp;gt; 0, Quantity,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If (Document = 'Shipped' and Quantity &amp;gt; 0, Quantity&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;BR /&gt;&amp;nbsp; &amp;nbsp; )&lt;BR /&gt;) as Quantity&lt;BR /&gt;FROM&lt;BR /&gt;[C:\Temp\test.qvd]&lt;BR /&gt;(qvd);&lt;/P&gt;&lt;P&gt;Join (Forecast)&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Document&lt;BR /&gt;Forecast&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Concatenate&lt;BR /&gt;Load&lt;BR /&gt;*&lt;BR /&gt;FROM&lt;BR /&gt;[C:\Temp\test.qvd]&lt;BR /&gt;(qvd);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the values in Forecast take every value from these tables, but i need only one form Plan, if it's null, then Order, if Order is null, then take value from Shipped.&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Снимок.JPG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/35766i1E459DD9A24E72C5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Снимок.JPG" alt="Снимок.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Maybe this task&amp;nbsp;is solved somehow differently?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:27:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-table-with-values-from-another-tables/m-p/1719924#M723316</guid>
      <dc:creator>bamtor</dc:creator>
      <dc:date>2024-11-16T00:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: New table with values from another tables</title>
      <link>https://community.qlik.com/t5/QlikView/New-table-with-values-from-another-tables/m-p/1719953#M723317</link>
      <description>&lt;P&gt;Try this to create your Forecast table:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Forecast:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;'Forecast' as Document,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;Date(Dates) as Dates,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;SUM(Quantity) as Quantity&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FROM&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;[C:\Temp\test.qvd] (qvd)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GROUP BY&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;Dates&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 10:51:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-table-with-values-from-another-tables/m-p/1719953#M723317</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-06-18T10:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: New table with values from another tables</title>
      <link>https://community.qlik.com/t5/QlikView/New-table-with-values-from-another-tables/m-p/1719957#M723318</link>
      <description>&lt;DIV class="tlid-input input has-transliteration"&gt;&lt;DIV class="source-wrap"&gt;&lt;DIV class="input-full-height-wrapper tlid-input-full-height-wrapper"&gt;&lt;DIV class="source-input"&gt;&lt;DIV class="tlid-source-transliteration-container source-transliteration-container transliteration-container"&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/25001"&gt;@Vegar&lt;/a&gt;&lt;SPAN&gt;!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="source-footer-wrap source-or-target-footer"&gt;&lt;DIV class="source-footer"&gt;&lt;DIV class="src-tts left-positioned ttsbutton jfk-button-flat source-or-target-footer-button jfk-button"&gt;&lt;DIV class="jfk-button-img"&gt;Thanks for reply.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="tlid-results-container results-container"&gt;&lt;DIV class="tlid-result result-dict-wrapper"&gt;&lt;DIV class="result tlid-copy-target"&gt;&lt;DIV class="text-wrap tlid-copy-target"&gt;&lt;DIV class="result-shield-container tlid-copy-target"&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN&gt;This option summarizes the values of each table, but it is necessary that the values are not summarized but taken by condition, if the Quantity has a value in the Plan, then take the Quantity value from the Plan, if there is no value in the Plan, then take the value from the Order, if there is no value,&lt;/SPAN&gt; &lt;SPAN&gt;then from Shipped.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 Jun 2020 11:01:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-table-with-values-from-another-tables/m-p/1719957#M723318</guid>
      <dc:creator>bamtor</dc:creator>
      <dc:date>2020-06-18T11:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: New table with values from another tables</title>
      <link>https://community.qlik.com/t5/QlikView/New-table-with-values-from-another-tables/m-p/1719977#M723319</link>
      <description>&lt;P&gt;Is this what you are lookin for?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vegar_1-1592480175259.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/35785iF7970E2300BA1C1F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vegar_1-1592480175259.png" alt="Vegar_1-1592480175259.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;Main:
LOAD * INLINE [
Document, Dates, Quantity
Plan, 04.06, 10
Plan, 05.06, 10
Plan, 06.06, 0
]
;

LOAD * INLINE [
Document, Dates, Quantity
Order, 04.06, 0
Order, 05.06, 20
Order, 06.06, 20
];

LOAD * INLINE [
Document, Dates, Quantity
Shipped, 04.06, 0
Shipped, 05.06, 0
Shipped, 06.06, 30
];

Concatenate
LOAD
	'Forecast' as Document ,
	Dates, 
	Dates as TMPDates,
	Quantity
Resident Main
Where Document = 'Plan' and Quantity &amp;lt;&amp;gt; 0;

Concatenate 
LOAD 
	'Forecast' as Document ,
	Dates, 
	Dates as TMPDates,
	Quantity
Resident Main
Where Document = 'Order' and Quantity &amp;lt;&amp;gt; 0
AND NOT EXISTS (TMPDates, Dates);


Concatenate 
LOAD 
	'Forecast' as Document,
	Dates, 
	Dates as TMPDates,
	Quantity
Resident Main
Where Document = 'Shipped' and Quantity &amp;lt;&amp;gt; 0
AND NOT EXISTS (TMPDates, Dates);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 11:36:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-table-with-values-from-another-tables/m-p/1719977#M723319</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-06-18T11:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: New table with values from another tables</title>
      <link>https://community.qlik.com/t5/QlikView/New-table-with-values-from-another-tables/m-p/1719997#M723320</link>
      <description>&lt;P&gt;Yes, it works, thank you &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/25001"&gt;@Vegar&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 12:26:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-table-with-values-from-another-tables/m-p/1719997#M723320</guid>
      <dc:creator>bamtor</dc:creator>
      <dc:date>2020-06-18T12:26:27Z</dc:date>
    </item>
  </channel>
</rss>

