<?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: How to calculate difference of the value between two records in a table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-of-the-value-between-two-records-in/m-p/1725509#M722661</link>
    <description>&lt;P&gt;Yes!&lt;/P&gt;&lt;P&gt;as you can replace the measure calculated by Column(1) in your case.&lt;/P&gt;&lt;P&gt;look at this example, I replaced the measure (in your case AVG.....)with Column(1)&lt;/P&gt;&lt;LI-CODE lang="python"&gt;=if(above(total Datum)=Datum,rangesum(above(total Column(1) )-Column(1)),0)&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37041i4B626CF07288D96D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jul 2020 20:45:27 GMT</pubDate>
    <dc:creator>Taoufiq_Zarra</dc:creator>
    <dc:date>2020-07-06T20:45:27Z</dc:date>
    <item>
      <title>How to calculate difference of the value between two records in a table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-of-the-value-between-two-records-in/m-p/1725077#M722654</link>
      <description>&lt;P&gt;I have several tanks with level measurment. Beside of showing the level in the tank I also want to show the amount of liquid used between two timestamps.&lt;/P&gt;&lt;P&gt;How can I calculate this usage?&lt;/P&gt;&lt;P&gt;With regards&lt;/P&gt;&lt;P&gt;Jan Droog&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Reliability-Engineer_0-1593903413130.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/36953i3F1C0ECAF16173E4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Reliability-Engineer_0-1593903413130.png" alt="Reliability-Engineer_0-1593903413130.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-of-the-value-between-two-records-in/m-p/1725077#M722654</guid>
      <dc:creator>Reliability-Engineer</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate difference of the value between two records in a table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-of-the-value-between-two-records-in/m-p/1725115#M722655</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;One solution :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;if(previous(Datum)=Datum,previous([LevelAcid Tank (ltr)])-[LevelAcid Tank (ltr)]) as Difference&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example for this sample :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;load *,if(previous(Datum)=Datum,previous([LevelAcid Tank (ltr)])-[LevelAcid Tank (ltr)]) as Difference  inLine [
Datum,tTimestamp,LevelAcid Tank (ltr)
1,1,905
1,2,881
1,3,856
1,4,829
1,5,803
1,6,777
1,7,751
1,8,724
1,9,699
1,10,686
2,1,1
2,2,10
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the output :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 529px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/36964iEFA2B9A2F8D12CC8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2020 12:00:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-of-the-value-between-two-records-in/m-p/1725115#M722655</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-07-05T12:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate difference of the value between two records in a table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-of-the-value-between-two-records-in/m-p/1725161#M722657</link>
      <description>&lt;P&gt;&lt;SPAN class="lia-link-navigation lia-page-link lia-link-disabled lia-user-name-link"&gt;&lt;SPAN class=""&gt;Taoufiq_ZARRA Thanks for your example.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-link-navigation lia-page-link lia-link-disabled lia-user-name-link"&gt;&lt;SPAN class=""&gt;Got the example working, but I need this calculation in the Expression box.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-link-navigation lia-page-link lia-link-disabled lia-user-name-link"&gt;&lt;SPAN class=""&gt;It that also possible?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Reliability-Engineer_1-1593978693849.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/36972i475191E1CD57994C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Reliability-Engineer_1-1593978693849.png" alt="Reliability-Engineer_1-1593978693849.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2020 19:52:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-of-the-value-between-two-records-in/m-p/1725161#M722657</guid>
      <dc:creator>Reliability-Engineer</dc:creator>
      <dc:date>2020-07-05T19:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate difference of the value between two records in a table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-of-the-value-between-two-records-in/m-p/1725239#M722659</link>
      <description>&lt;P&gt;One solution&lt;/P&gt;&lt;P&gt;Dimension :&lt;/P&gt;&lt;P&gt;Datum,tTimestamp,LevelAcid Tank (ltr)&lt;/P&gt;&lt;P&gt;Expression :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;=if(above(total Datum)=Datum,rangesum(above(total sum([LevelAcid Tank (ltr)]))-sum([LevelAcid Tank (ltr)])),0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 840px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/36994i9C29FB8104EE3688/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 08:56:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-of-the-value-between-two-records-in/m-p/1725239#M722659</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-07-06T08:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate difference of the value between two records in a table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-of-the-value-between-two-records-in/m-p/1725493#M722660</link>
      <description>&lt;P&gt;Got this one running.&lt;/P&gt;&lt;P&gt;Is it also possible when LevelAcid-Tank is a calculated value?&lt;/P&gt;&lt;P&gt;With regards, Jan&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Reliability-Engineer_0-1594062806144.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37037iFA3F72B28E1BCB03/image-size/large?v=v2&amp;amp;px=999" role="button" title="Reliability-Engineer_0-1594062806144.png" alt="Reliability-Engineer_0-1594062806144.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 19:14:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-of-the-value-between-two-records-in/m-p/1725493#M722660</guid>
      <dc:creator>Reliability-Engineer</dc:creator>
      <dc:date>2020-07-06T19:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate difference of the value between two records in a table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-of-the-value-between-two-records-in/m-p/1725509#M722661</link>
      <description>&lt;P&gt;Yes!&lt;/P&gt;&lt;P&gt;as you can replace the measure calculated by Column(1) in your case.&lt;/P&gt;&lt;P&gt;look at this example, I replaced the measure (in your case AVG.....)with Column(1)&lt;/P&gt;&lt;LI-CODE lang="python"&gt;=if(above(total Datum)=Datum,rangesum(above(total Column(1) )-Column(1)),0)&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37041i4B626CF07288D96D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 20:45:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-of-the-value-between-two-records-in/m-p/1725509#M722661</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-07-06T20:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate difference of the value between two records in a table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-of-the-value-between-two-records-in/m-p/1726285#M722662</link>
      <description>&lt;P&gt;YES!!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's exactly what i needed.&amp;nbsp;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for helping me out.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jan Droog&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 21:42:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-of-the-value-between-two-records-in/m-p/1726285#M722662</guid>
      <dc:creator>Reliability-Engineer</dc:creator>
      <dc:date>2020-07-08T21:42:01Z</dc:date>
    </item>
  </channel>
</rss>

