<?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 Percentage change from previous day. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Percentage-change-from-previous-day/m-p/157983#M33243</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I need QlikView to find the number of calls in a particular hour of a particular day and compare it to the same hour in the previous day and provide me with the percentage increase/decrease.&lt;/P&gt;&lt;P&gt;For example.&lt;/P&gt;&lt;P&gt;13:00 on 10/02/2010 - 100 Calls&lt;/P&gt;&lt;P&gt;13:00 on 09/02/2010 - 80 Calls. So the percentage increase would be 25%.&lt;/P&gt;&lt;P&gt;The data in Excel is as follows;&lt;/P&gt;&lt;P&gt;Column for Date, column for time (Hourly) and column for Number of Calls.&lt;/P&gt;&lt;P&gt;Ideally the hour would not be fixed and the calculation would change depending on which hour the user selects.&lt;/P&gt;&lt;P&gt;Apologies if unclear as I'm new to QlikView and cannot post my data file/QV document due to company policy.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Aug 2010 11:22:50 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-08-12T11:22:50Z</dc:date>
    <item>
      <title>Percentage change from previous day.</title>
      <link>https://community.qlik.com/t5/QlikView/Percentage-change-from-previous-day/m-p/157983#M33243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I need QlikView to find the number of calls in a particular hour of a particular day and compare it to the same hour in the previous day and provide me with the percentage increase/decrease.&lt;/P&gt;&lt;P&gt;For example.&lt;/P&gt;&lt;P&gt;13:00 on 10/02/2010 - 100 Calls&lt;/P&gt;&lt;P&gt;13:00 on 09/02/2010 - 80 Calls. So the percentage increase would be 25%.&lt;/P&gt;&lt;P&gt;The data in Excel is as follows;&lt;/P&gt;&lt;P&gt;Column for Date, column for time (Hourly) and column for Number of Calls.&lt;/P&gt;&lt;P&gt;Ideally the hour would not be fixed and the calculation would change depending on which hour the user selects.&lt;/P&gt;&lt;P&gt;Apologies if unclear as I'm new to QlikView and cannot post my data file/QV document due to company policy.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 11:22:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentage-change-from-previous-day/m-p/157983#M33243</guid>
      <dc:creator />
      <dc:date>2010-08-12T11:22:50Z</dc:date>
    </item>
    <item>
      <title>Percentage change from previous day.</title>
      <link>https://community.qlik.com/t5/QlikView/Percentage-change-from-previous-day/m-p/157984#M33244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even when it's against company policy to post your document, it can be very helpful if you post a sample QlikView document with a very simplified version of the data you're using, along with the results you expect. For instance, in the attached solution, I use this to generate some sample data:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Calls:&lt;BR /&gt;LOAD&lt;BR /&gt; recno() as ID&lt;BR /&gt;,timestamp(date#(20100801,'YYYYMMDD')+floor(rand()*12*24)/24) as Hour&lt;BR /&gt;AUTOGENERATE 10000&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;My suggested solution is to do something fairly complicated, which is to build a table that links today's hours to themselves AND to yesterday's hours, with flags letting you know what you're looking at:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;AsOf:&lt;BR /&gt;// For each available hour, tie it to itself with the "Today?" flag.&lt;BR /&gt;LOAD&lt;BR /&gt; timestamp(fieldvalue('Hour',iterno())) as AsOfHour&lt;BR /&gt;,timestamp(fieldvalue('Hour',iterno())) as Hour&lt;BR /&gt;,1 as Today?&lt;BR /&gt;AUTOGENERATE 1&lt;BR /&gt;WHILE len(fieldvalue('Hour',iterno()))&lt;BR /&gt;;&lt;BR /&gt;// For each available hour, tie it to 24 hours ago with the "Yesterday?" flag.&lt;BR /&gt;CONCATENATE (AsOf)&lt;BR /&gt;LOAD&lt;BR /&gt; AsOfHour&lt;BR /&gt;,timestamp(AsOfHour-1) as Hour&lt;BR /&gt;,1 as Yesterday?&lt;BR /&gt;RESIDENT AsOf&lt;BR /&gt;;&lt;BR /&gt;// Only keep the connection to yesterday if the hour actually exists yesterday.&lt;BR /&gt;INNER JOIN (AsOf)&lt;BR /&gt;LOAD AsOfHour as Hour&lt;BR /&gt;RESIDENT AsOf&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Then use AsOfHour as your table dimension instead of Hour, and use the two flags to control what you include in your count of calls. There are simpler solutions, but I think this is more robust than the simpler solutions that I'm aware of.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 23:54:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentage-change-from-previous-day/m-p/157984#M33244</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-08-12T23:54:54Z</dc:date>
    </item>
  </channel>
</rss>

