<?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: Sum all data to specific date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-all-data-to-specific-date/m-p/421372#M487208</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Please fiend the attachment of applicaton and lt me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/alert.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 10 Feb 2013 17:51:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-02-10T17:51:03Z</dc:date>
    <item>
      <title>Sum all data to specific date</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-all-data-to-specific-date/m-p/421367#M487203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;G'day &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data is &lt;/P&gt;&lt;P&gt;date product qty &lt;/P&gt;&lt;P&gt;1.1.13 prod-X 1 &lt;/P&gt;&lt;P&gt;1.1.13 prod-Y 1 &lt;/P&gt;&lt;P&gt;2.1.13 prod-X 1 &lt;/P&gt;&lt;P&gt;3.1.13 prod-X -1 &lt;/P&gt;&lt;P&gt;I want to calculate my invnentory for&amp;nbsp; 2.1.13 &lt;/P&gt;&lt;P&gt;the result should be&lt;/P&gt;&lt;P&gt;Prod-X 2&lt;/P&gt;&lt;P&gt;Prod-Y 1&lt;/P&gt;&lt;P&gt;my problem is that when I chose the date 2.1.13 I only get the invnetory for Prod-X and not Prod-Y because he had not data on the chosen date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My formula is&lt;/P&gt;&lt;P&gt;sum&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;= {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;lt;=$(=max(SA_DATE))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CALC_QTY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;where SA_DATE is the date I select&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Any help is appreicated&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 22:40:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-all-data-to-specific-date/m-p/421367#M487203</guid>
      <dc:creator>egoziyan</dc:creator>
      <dc:date>2013-02-08T22:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sum all data to specific date</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-all-data-to-specific-date/m-p/421368#M487204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your expression is correct, but check the date formats in date field&amp;nbsp; and &lt;SPAN style="color: #800000; font-size: 8pt;"&gt;max(SA_DATE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;= {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;lt;=$(=max(SA_DATE))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CALC_QTY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 23:13:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-all-data-to-specific-date/m-p/421368#M487204</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-02-08T23:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Sum all data to specific date</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-all-data-to-specific-date/m-p/421369#M487205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not create a running total table by product and whatever other dimensions you want to support in the script? would be a lot faster than set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; monthstart(masterdate) as date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(qty) as inventoryCount,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; productid,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dim1,..&lt;/P&gt;&lt;P&gt;RESIDENT fact&lt;/P&gt;&lt;P&gt;GROUP BY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can create a composite key to rid of the synthetic that may result and do an AUTONUMBER on the composite key to gain in performance AUTONUMBER(monthstart(masterdate) &amp;amp; '_' &amp;amp; productid) AS key and have the same key in the Fact table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2013 05:28:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-all-data-to-specific-date/m-p/421369#M487205</guid>
      <dc:creator>avastani</dc:creator>
      <dc:date>2013-02-09T05:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Sum all data to specific date</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-all-data-to-specific-date/m-p/421370#M487206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;assuming that you might have a lot of transactions in your inventory file, the idea to pre-calculate a running balance is certainly the best, in terms of performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To answer the specific question, and to clarify Jagan's answer - in Set Analysis, when comparing dates, you need to spcify exactly the same date format as used for the date field in question. On the other hand, the function max() is always returning a numeric value. Therefore, it's impossible to use unformatted result of max() as a selection value for a date field. So, the correct formula should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;=sum&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #800000;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;= {&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #800000;"&gt;"&amp;lt;=$(=date(max(SA_DATE)))"&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #800000;"&gt;CALC_QTY&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assuming that the Date is formatted using the default date format. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Feb 2013 03:47:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-all-data-to-specific-date/m-p/421370#M487206</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2013-02-10T03:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sum all data to specific date</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-all-data-to-specific-date/m-p/421371#M487207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jagan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sorry to intrept this thread. I am new to qlikview. Where i can download this? i didnt find any trial version of qlikview. Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;gowtham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Feb 2013 16:56:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-all-data-to-specific-date/m-p/421371#M487207</guid>
      <dc:creator />
      <dc:date>2013-02-10T16:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sum all data to specific date</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-all-data-to-specific-date/m-p/421372#M487208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Please fiend the attachment of applicaton and lt me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/alert.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Feb 2013 17:51:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-all-data-to-specific-date/m-p/421372#M487208</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-02-10T17:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sum all data to specific date</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-all-data-to-specific-date/m-p/421373#M487209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks you all for the help.&lt;/P&gt;&lt;P&gt;I am sorry it took me along time but I was stock with it and eventually I found my problem in my date calander.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2013 22:09:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-all-data-to-specific-date/m-p/421373#M487209</guid>
      <dc:creator>egoziyan</dc:creator>
      <dc:date>2013-02-17T22:09:14Z</dc:date>
    </item>
  </channel>
</rss>

