<?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: Set analysis: dates using dates from another table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-dates-using-dates-from-another-table/m-p/1694436#M455684</link>
    <description>&lt;P&gt;Check again. I failed to give you correct data to input. Your model does not actually have a join on customer ID since one of the two has small caps for ID...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if you had a propoer model that was joined, it would return 103 instead of 165. That is the total revenu for customer 1,3 and 4, the only customers to have requests on april 12th.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Apr 2020 12:53:38 GMT</pubDate>
    <dc:creator>sibrulotte</dc:creator>
    <dc:date>2020-04-17T12:53:38Z</dc:date>
    <item>
      <title>Set analysis: dates using dates from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dates-using-dates-from-another-table/m-p/1694282#M455679</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables joined by customer ID. One table has requested amount, adn a date of request. The other has actual revenu, and a revenu date.&lt;/P&gt;&lt;P&gt;I do not want to create a master calendar that would mess up the data model and create circular references.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to show a table with a date as dimension, sum of requested amount for that day, and sum of actual revenue for that same day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Requests:&lt;/P&gt;&lt;TABLE width="262"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="80"&gt;Customer Id&lt;/TD&gt;&lt;TD width="102"&gt;Request date&lt;/TD&gt;&lt;TD width="80"&gt;request amount&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2020-04-10&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;2020-04-10&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2020-04-12&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;2020-04-12&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;2020-04-12&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;2020-04-15&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actuals:&lt;/P&gt;&lt;TABLE border="0" width="240" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="79.2593px" height="19"&gt;Customer ID&lt;/TD&gt;&lt;TD width="79.2593px"&gt;revenu date&lt;/TD&gt;&lt;TD width="80px"&gt;actual revenu&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="79.2593px" height="19"&gt;1&lt;/TD&gt;&lt;TD width="79.2593px"&gt;2020-04-12&lt;/TD&gt;&lt;TD width="80px"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="79.2593px" height="19"&gt;2&lt;/TD&gt;&lt;TD width="79.2593px"&gt;2020-04-12&lt;/TD&gt;&lt;TD width="80px"&gt;16&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="79.2593px" height="19"&gt;1&lt;/TD&gt;&lt;TD width="79.2593px"&gt;2020-04-12&lt;/TD&gt;&lt;TD width="80px"&gt;21&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="79.2593px" height="19"&gt;3&lt;/TD&gt;&lt;TD width="79.2593px"&gt;2020-04-12&lt;/TD&gt;&lt;TD width="80px"&gt;28&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="79.2593px" height="19"&gt;4&lt;/TD&gt;&lt;TD width="79.2593px"&gt;2020-04-12&lt;/TD&gt;&lt;TD width="80px"&gt;42&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="79.2593px" height="19"&gt;5&lt;/TD&gt;&lt;TD width="79.2593px"&gt;2020-04-12&lt;/TD&gt;&lt;TD width="80px"&gt;46&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Resulting graph pivot table would look like this&lt;/P&gt;&lt;TABLE width="262"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="102"&gt;Date&lt;/TD&gt;&lt;TD width="80"&gt;requested amount&lt;/TD&gt;&lt;TD width="80"&gt;actual amount&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2020-04-10&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2020-04-12&lt;/TD&gt;&lt;TD&gt;90&lt;/TD&gt;&lt;TD&gt;165&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2020-04-15&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm thinking I might have to build a table in the script...&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 00:10:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dates-using-dates-from-another-table/m-p/1694282#M455679</guid>
      <dc:creator>sibrulotte</dc:creator>
      <dc:date>2020-04-17T00:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis: dates using dates from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dates-using-dates-from-another-table/m-p/1694291#M455680</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;Dimension for pivot table:&lt;/P&gt;&lt;P&gt;Request Date&lt;/P&gt;&lt;P&gt;Expressions:&lt;/P&gt;&lt;P&gt;sum([request amount])&lt;/P&gt;&lt;P&gt;sum (DISTINCT if([Request date]=[revenu date],[actual revenu]))&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 02:02:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dates-using-dates-from-another-table/m-p/1694291#M455680</guid>
      <dc:creator>Arthur_Fong</dc:creator>
      <dc:date>2020-04-17T02:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis: dates using dates from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dates-using-dates-from-another-table/m-p/1694296#M455681</link>
      <description>&lt;P&gt;thx for the try.&lt;/P&gt;&lt;P&gt;Returns 0 for all dates though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 02:27:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dates-using-dates-from-another-table/m-p/1694296#M455681</guid>
      <dc:creator>sibrulotte</dc:creator>
      <dc:date>2020-04-17T02:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis: dates using dates from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dates-using-dates-from-another-table/m-p/1694302#M455682</link>
      <description>&lt;P&gt;I am getting the expected output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MC.PNG" style="width: 388px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/32008i3B35A2E47C6AC239/image-size/large?v=v2&amp;amp;px=999" role="button" title="MC.PNG" alt="MC.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Do check back your Dates field, whether they are in date format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 02:38:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dates-using-dates-from-another-table/m-p/1694302#M455682</guid>
      <dc:creator>Arthur_Fong</dc:creator>
      <dc:date>2020-04-17T02:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis: dates using dates from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dates-using-dates-from-another-table/m-p/1694436#M455684</link>
      <description>&lt;P&gt;Check again. I failed to give you correct data to input. Your model does not actually have a join on customer ID since one of the two has small caps for ID...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if you had a propoer model that was joined, it would return 103 instead of 165. That is the total revenu for customer 1,3 and 4, the only customers to have requests on april 12th.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 12:53:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dates-using-dates-from-another-table/m-p/1694436#M455684</guid>
      <dc:creator>sibrulotte</dc:creator>
      <dc:date>2020-04-17T12:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis: dates using dates from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dates-using-dates-from-another-table/m-p/1694560#M455685</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Requests:
load Key,Date,sum([request amount])as [request amount]
group by Key,
		Date; 
load [request amount],[Request date]&amp;amp;'|'&amp;amp;[Customer ID] as Key,[Request date]as Date
 inline [
Customer ID	Request date	request amount
1	2020-04-10	10
2	2020-04-10	15
1	2020-04-12	20
3	2020-04-12	30
4	2020-04-12	40
5	2020-04-15	50
](delimiter is '	'); 
join
load Key,Date,sum([actual revenu])as [actual revenu]
group by Key,
		Date; 
load [actual revenu],[revenu date]&amp;amp;'|'&amp;amp;[Customer ID] as Key,[revenu date]as Date
 inline [
Customer ID	revenu date	actual revenu
1	2020-04-12	12
2	2020-04-12	16
1	2020-04-12	21
3	2020-04-12	28
4	2020-04-12	42
5	2020-04-12	46
](delimiter is '	');

exit script;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Front end table:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dimension : Date&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Measure : sum([request amount])&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: sum([actual revenu])&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MC.PNG" style="width: 362px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/32061i06694576F2B73407/image-size/large?v=v2&amp;amp;px=999" role="button" title="MC.PNG" alt="MC.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2020 07:24:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dates-using-dates-from-another-table/m-p/1694560#M455685</guid>
      <dc:creator>Arthur_Fong</dc:creator>
      <dc:date>2020-04-18T07:24:52Z</dc:date>
    </item>
  </channel>
</rss>

