<?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 Sum previous quantity vs selected date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-previous-quantity-vs-selected-date/m-p/323830#M119337</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have already found a part of the solution...I mean If I use this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;[Data] = {"&amp;lt;=$(=Date(num(min(Data))-1))"}&amp;gt;} Quantita)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I select some values in the Data field, it's work corectly...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but If I select month or year the previus code doesn't work... the problem is that I don't know which fields the user want to use...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx again&lt;/P&gt;&lt;P&gt;Sabina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Nov 2011 23:51:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-11-16T23:51:14Z</dc:date>
    <item>
      <title>Sum previous quantity vs selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-previous-quantity-vs-selected-date/m-p/323826#M119333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; Hi to all I'm a new QV user and I have a problem to sum some values...&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Here my problem, I need to sum values where the data is smaller the the select data:&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;For example:&lt;/DIV&gt;&lt;DIV&gt;I have 4 column &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Data &lt;/DIV&gt;&lt;DIV&gt;Month&lt;/DIV&gt;&lt;DIV&gt;Category&lt;/DIV&gt;&lt;DIV&gt;Quantity &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;If I select month = november I want to sum all the previus quantity... and If&amp;nbsp; I filter category= Cat1, I want to sum all the previous (before novembre) quantity but only from Cat1&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; Es.&lt;/DIV&gt;&lt;DIV&gt;Jan to october Cat1 --&amp;gt; Sum(Quantity) = 10&lt;/DIV&gt;&lt;DIV&gt;Jan to october Cat2 --&amp;gt;sum(Quantity) = 2&lt;/DIV&gt;&lt;DIV&gt;If I select november I want as result 12 If I select november cat 1 I want 10&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I tried with this but it doesn't work&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;DIV&gt;=&lt;/DIV&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Data&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;lt;=$(&amp;lt;Data)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Quantita&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Can somebody help me&lt;/DIV&gt;&lt;DIV&gt;Thx&lt;/DIV&gt;&lt;DIV&gt;Sabina&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;P:S:Attached the file&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 11:58:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-previous-quantity-vs-selected-date/m-p/323826#M119333</guid>
      <dc:creator />
      <dc:date>2011-11-16T11:58:26Z</dc:date>
    </item>
    <item>
      <title>Sum previous quantity vs selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-previous-quantity-vs-selected-date/m-p/323827#M119334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;use below code &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;Mese&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;"&amp;lt;=$(=Mese)"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;Quantita&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;hope this helps&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 12:12:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-previous-quantity-vs-selected-date/m-p/323827#M119334</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2011-11-16T12:12:34Z</dc:date>
    </item>
    <item>
      <title>Sum previous quantity vs selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-previous-quantity-vs-selected-date/m-p/323828#M119335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;unfortunately it doesn't work,&amp;nbsp; the problem is that I need to sum all the values where the date is smaller then the selected date.&amp;nbsp; if I use = is not correct, would be &amp;lt; but I think that can't use logic operator in this kind of string.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I insert the code in my test file (attached) the result is 30 instead 26 futhermore if I select some days it dosen't work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...any other idea ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx in advance&lt;/P&gt;&lt;P&gt;Sabina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 22:03:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-previous-quantity-vs-selected-date/m-p/323828#M119335</guid>
      <dc:creator />
      <dc:date>2011-11-16T22:03:31Z</dc:date>
    </item>
    <item>
      <title>Sum previous quantity vs selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-previous-quantity-vs-selected-date/m-p/323829#M119336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll need to convert the Date into Date in your script and then use it in the set analysis. As far as using Months is concerned: you can try: Sum({$&amp;lt;Mese = {'&amp;lt;=$(=max(Mese))'}&amp;gt;}Quantita)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 23:04:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-previous-quantity-vs-selected-date/m-p/323829#M119336</guid>
      <dc:creator />
      <dc:date>2011-11-16T23:04:46Z</dc:date>
    </item>
    <item>
      <title>Sum previous quantity vs selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-previous-quantity-vs-selected-date/m-p/323830#M119337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have already found a part of the solution...I mean If I use this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;[Data] = {"&amp;lt;=$(=Date(num(min(Data))-1))"}&amp;gt;} Quantita)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I select some values in the Data field, it's work corectly...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but If I select month or year the previus code doesn't work... the problem is that I don't know which fields the user want to use...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx again&lt;/P&gt;&lt;P&gt;Sabina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 23:51:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-previous-quantity-vs-selected-date/m-p/323830#M119337</guid>
      <dc:creator />
      <dc:date>2011-11-16T23:51:14Z</dc:date>
    </item>
  </channel>
</rss>

