<?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: Last selected value minus first selected value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-selected-value-minus-first-selected-value/m-p/967763#M648713</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your fast reply but maybe I should be more clear:&lt;/P&gt;&lt;P&gt;1.I have a line chart, displaying agg quantity of many Tanks with liquid (containers) which can be filtered by many list box like:&lt;/P&gt;&lt;P&gt;Type of material in container and\or country in which the Tanks located, Cites in which the tank located and set.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;2. In addition, the user can filet (by list box) any &lt;/SPAN&gt;period he likes: from a year\month\day list box (so he can pick 3 days or 482 days or every first of the month for 2014 and 2015 and so on. The data reflect in the line chart with the expression (as I wrote in the first post) &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; : &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;Aggr (Sum (TL1),[day/month/year],P1)&amp;nbsp;&amp;nbsp; where TL1=Liquid qty and P1=Liquid type.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;3. I do not want to calculate max - min value but earliest's date value minus latest's date value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried adjusting your express , looking for the earliest point with:&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum({&amp;lt;Day\Month\Year={$(=min(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;Day\Month\Year&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;))}&amp;gt;}Aggr(Sum(TL1),&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;Day\Month\Year&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;)) but there is a script problem with &lt;/SPAN&gt;&lt;STRONG style=": ; color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;{$(...&amp;nbsp; it show the expression after the $ as a variable (in gray).&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;&lt;STRONG style=": ; color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;&lt;STRONG style=": ; color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Thank you!&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;&lt;STRONG style=": ; color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Nir&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Sep 2015 08:38:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-09-17T08:38:15Z</dc:date>
    <item>
      <title>Last selected value minus first selected value</title>
      <link>https://community.qlik.com/t5/QlikView/Last-selected-value-minus-first-selected-value/m-p/967759#M648709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have the following expression:&lt;/P&gt;&lt;P&gt;Aggr (Sum (TL1),[day/month/year],P1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where TL1 is current quantity of liquid (which input on daily basic) and P1 is the type of the liquid.&lt;/P&gt;&lt;P&gt;I want to show, for every selected period ,which the user can make for this chart, what is the difference between the last selected&amp;nbsp; value from the first value &lt;/P&gt;&lt;P&gt;Surly if I knew how to calculate the last and first value it will do.&lt;/P&gt;&lt;P&gt;For example if I select&amp;nbsp; from 23 to April to 17 of may , and every day hold a value I which to know what is the difference between the value of 17.5 minus 23.4&amp;nbsp;&amp;nbsp; (and see how much liquid went loss).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How does is combine with the fact that I have more than one liquid ? since the user can show in the chart 4 diff. liquids or filter only one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nir GL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2015 06:45:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-selected-value-minus-first-selected-value/m-p/967759#M648709</guid>
      <dc:creator />
      <dc:date>2015-09-17T06:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Last selected value minus first selected value</title>
      <link>https://community.qlik.com/t5/QlikView/Last-selected-value-minus-first-selected-value/m-p/967760#M648710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post sample data and desired output, see if below details can help to calculate top value, taken from ref manual - &lt;/P&gt;&lt;P&gt;&lt;IMG alt="181079.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/99202_181079.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2015 06:56:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-selected-value-minus-first-selected-value/m-p/967760#M648710</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-09-17T06:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Last selected value minus first selected value</title>
      <link>https://community.qlik.com/t5/QlikView/Last-selected-value-minus-first-selected-value/m-p/967761#M648711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately I am not allowed to export the data BUT&lt;/P&gt;&lt;P&gt;let say I have the following data for the last week:&lt;/P&gt;&lt;P&gt;10.9 = 100 (liters)&lt;/P&gt;&lt;P&gt;11.9=99&lt;/P&gt;&lt;P&gt;12.9=97&lt;/P&gt;&lt;P&gt;13.9=97&lt;/P&gt;&lt;P&gt;14.9=96.5&lt;/P&gt;&lt;P&gt;15.9=95&lt;/P&gt;&lt;P&gt;16.9=94&lt;/P&gt;&lt;P&gt;17.9=90&lt;/P&gt;&lt;P&gt;Now the user can select the whole week (10-17.9) than I wish to see in a Text Box (or what ever) the calculated value 10 (100-90).&lt;/P&gt;&lt;P&gt;The user can also select 13-16.9 than I wish to see the calculated value 3 (97-94).&lt;/P&gt;&lt;P&gt;This is for Tank 1 which is in Group A in country X.&lt;/P&gt;&lt;P&gt;I have many tanks of liquid in Group A and more than one group in Country X. &lt;/P&gt;&lt;P&gt;In addition i Have different liquids in the different tank (not mix in one tank of course) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2015 07:05:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-selected-value-minus-first-selected-value/m-p/967761#M648711</guid>
      <dc:creator />
      <dc:date>2015-09-17T07:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Last selected value minus first selected value</title>
      <link>https://community.qlik.com/t5/QlikView/Last-selected-value-minus-first-selected-value/m-p/967762#M648712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Try like attached -&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;=Sum({&amp;lt;Week={$(=min(Week))}&amp;gt;}Aggr(Sum(Value),Week))-Sum({&amp;lt;Week={$(=max(Week))}&amp;gt;}Aggr(Sum(Value),Week))&lt;/P&gt;&lt;P&gt;&lt;IMG alt="073.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/99209_073.PNG" style="height: 173px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2015 08:06:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-selected-value-minus-first-selected-value/m-p/967762#M648712</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-09-17T08:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Last selected value minus first selected value</title>
      <link>https://community.qlik.com/t5/QlikView/Last-selected-value-minus-first-selected-value/m-p/967763#M648713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your fast reply but maybe I should be more clear:&lt;/P&gt;&lt;P&gt;1.I have a line chart, displaying agg quantity of many Tanks with liquid (containers) which can be filtered by many list box like:&lt;/P&gt;&lt;P&gt;Type of material in container and\or country in which the Tanks located, Cites in which the tank located and set.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;2. In addition, the user can filet (by list box) any &lt;/SPAN&gt;period he likes: from a year\month\day list box (so he can pick 3 days or 482 days or every first of the month for 2014 and 2015 and so on. The data reflect in the line chart with the expression (as I wrote in the first post) &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; : &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;Aggr (Sum (TL1),[day/month/year],P1)&amp;nbsp;&amp;nbsp; where TL1=Liquid qty and P1=Liquid type.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;3. I do not want to calculate max - min value but earliest's date value minus latest's date value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried adjusting your express , looking for the earliest point with:&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum({&amp;lt;Day\Month\Year={$(=min(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;Day\Month\Year&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;))}&amp;gt;}Aggr(Sum(TL1),&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;Day\Month\Year&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;)) but there is a script problem with &lt;/SPAN&gt;&lt;STRONG style=": ; color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;{$(...&amp;nbsp; it show the expression after the $ as a variable (in gray).&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;&lt;STRONG style=": ; color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;&lt;STRONG style=": ; color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Thank you!&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;&lt;STRONG style=": ; color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Nir&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2015 08:38:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-selected-value-minus-first-selected-value/m-p/967763#M648713</guid>
      <dc:creator />
      <dc:date>2015-09-17T08:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Last selected value minus first selected value</title>
      <link>https://community.qlik.com/t5/QlikView/Last-selected-value-minus-first-selected-value/m-p/967764#M648714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you can share sample data (even 1-2 sample rows) with all dimensions, I think I can make it work. Day\Month\Year is what? single date value or 3 different fields? invalid date formatting can also create issue. Somehow I feel it can be applied properly to identify min selected week(period) and max selected week(period) to get rid of issues. Set Analysis syntax is bit complex, even a small typo of ,{&amp;lt; here and there can create problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2015 09:04:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-selected-value-minus-first-selected-value/m-p/967764#M648714</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-09-17T09:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Last selected value minus first selected value</title>
      <link>https://community.qlik.com/t5/QlikView/Last-selected-value-minus-first-selected-value/m-p/967765#M648715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I got the answer, if any one else need it:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Date={'$(=&lt;STRONG&gt;MIn&lt;/STRONG&gt;(Date))'}&amp;gt;} Qty1+Qty2)&amp;nbsp; -&amp;nbsp; Sum({&amp;lt;Date={'$(=&lt;STRONG&gt;Max&lt;/STRONG&gt;(Date))'}&amp;gt;} Qty1+Qty2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where Qty1+Qty2 is just an example to my complex aggregation expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition you need to define in the script the following:&lt;/P&gt;&lt;P&gt;date(date#(Date,'DD.MM.YY'),'DD/MM/YYYY') as Date,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attach the Qlik and Data file which I created to explain my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck and thank you all for your effort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2015 08:07:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-selected-value-minus-first-selected-value/m-p/967765#M648715</guid>
      <dc:creator />
      <dc:date>2015-09-21T08:07:59Z</dc:date>
    </item>
  </channel>
</rss>

