<?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 Calculating Inflation between two time periods in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculating-Inflation-between-two-time-periods/m-p/722857#M259450</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am currently struggling with trying to calculate Inflation between two periods as it is not the true value. I have attached an example model with details explaining what needs to be achieved in more depth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the short of it:&lt;/P&gt;&lt;P&gt;A user would select two Periods/Dates so that we have a min date and a max date. So for example period 1 = Month 1 which contains Products 1,2 &amp;amp; 3. This would be the minimum Period. Period 2 = Month 2 which contains Products 1,2,4. which would be our max period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for Period 1 we sum Quantity which would be:&lt;/P&gt;&lt;P&gt;Product 1 Qty 10&lt;/P&gt;&lt;P&gt;Product 2 Qty 15&lt;/P&gt;&lt;P&gt;Product 3 Qty 10&lt;/P&gt;&lt;P&gt;Total = 35.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Period 2 we sum Quantity which would be&lt;/P&gt;&lt;P&gt;Product 1 Qty 20&lt;/P&gt;&lt;P&gt;Product 2 Qty 10&lt;/P&gt;&lt;P&gt;Product 4 Qty 20&lt;/P&gt;&lt;P&gt;Total = 50&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore the Inflation calculation would be&lt;/P&gt;&lt;P&gt;((Period 2 - Period 1) / Period 2)&lt;/P&gt;&lt;P&gt;= ((50-35)/50)&lt;/P&gt;&lt;P&gt;= 30%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this is not the True inflation as its comparing apples with oranges. In order to get the true inflation one would need to calculate the inflation only where products exist in both periods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore the true inflation would be to:&lt;/P&gt;&lt;P&gt;((Sum(period 2) for Product 1 &amp;amp; 2 - Sum(Period 1) for Product 1 &amp;amp; 2) / Sum(Period2) for Product 1&amp;amp;2)&lt;/P&gt;&lt;P&gt;= ((30 - 25) / 30)&lt;/P&gt;&lt;P&gt;=16.67%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As now you are comparing Inflation grouped by product. Please advise how this can be done in Qlikview&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Aug 2014 09:55:46 GMT</pubDate>
    <dc:creator>tyron_dougans</dc:creator>
    <dc:date>2014-08-06T09:55:46Z</dc:date>
    <item>
      <title>Calculating Inflation between two time periods</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-Inflation-between-two-time-periods/m-p/722857#M259450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am currently struggling with trying to calculate Inflation between two periods as it is not the true value. I have attached an example model with details explaining what needs to be achieved in more depth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the short of it:&lt;/P&gt;&lt;P&gt;A user would select two Periods/Dates so that we have a min date and a max date. So for example period 1 = Month 1 which contains Products 1,2 &amp;amp; 3. This would be the minimum Period. Period 2 = Month 2 which contains Products 1,2,4. which would be our max period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for Period 1 we sum Quantity which would be:&lt;/P&gt;&lt;P&gt;Product 1 Qty 10&lt;/P&gt;&lt;P&gt;Product 2 Qty 15&lt;/P&gt;&lt;P&gt;Product 3 Qty 10&lt;/P&gt;&lt;P&gt;Total = 35.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Period 2 we sum Quantity which would be&lt;/P&gt;&lt;P&gt;Product 1 Qty 20&lt;/P&gt;&lt;P&gt;Product 2 Qty 10&lt;/P&gt;&lt;P&gt;Product 4 Qty 20&lt;/P&gt;&lt;P&gt;Total = 50&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore the Inflation calculation would be&lt;/P&gt;&lt;P&gt;((Period 2 - Period 1) / Period 2)&lt;/P&gt;&lt;P&gt;= ((50-35)/50)&lt;/P&gt;&lt;P&gt;= 30%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this is not the True inflation as its comparing apples with oranges. In order to get the true inflation one would need to calculate the inflation only where products exist in both periods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore the true inflation would be to:&lt;/P&gt;&lt;P&gt;((Sum(period 2) for Product 1 &amp;amp; 2 - Sum(Period 1) for Product 1 &amp;amp; 2) / Sum(Period2) for Product 1&amp;amp;2)&lt;/P&gt;&lt;P&gt;= ((30 - 25) / 30)&lt;/P&gt;&lt;P&gt;=16.67%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As now you are comparing Inflation grouped by product. Please advise how this can be done in Qlikview&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2014 09:55:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-Inflation-between-two-time-periods/m-p/722857#M259450</guid>
      <dc:creator>tyron_dougans</dc:creator>
      <dc:date>2014-08-06T09:55:46Z</dc:date>
    </item>
  </channel>
</rss>

