<?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 Previous Period in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Previous-Period/m-p/197068#M56881</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've never used the ParellelPeriod method, but it looks interesting. I'm not sure if you can use MDX in QlikView loads.&lt;/P&gt;&lt;P&gt;If you're looking to do something on the load script, you should be able to do it using QlikView functionality. Here is a sample that works using Inlines similar to your sample:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Data:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Period, Amount&lt;BR /&gt; P1, 50&lt;BR /&gt; P2, 60&lt;BR /&gt; P3, 70&lt;BR /&gt;];&lt;BR /&gt;Calendar:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Period, PrevPeriod&lt;BR /&gt; P1,&lt;BR /&gt; P2, P1&lt;BR /&gt; P3, P2&lt;BR /&gt;];&lt;BR /&gt;DataPrev:&lt;BR /&gt;LOAD Period As PrevPeriod, Amount As PrevAmount&lt;BR /&gt;RESIDENT Data;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I'm sure similar logic could be applied to loads from a database or other source.&lt;/P&gt;&lt;P&gt;Also, check out another recent thread that is trying to do something similar. The solution in that thread seemed to be to handle it in the load, so you may get some ideas: &lt;A href="http://community.qlik.com/forums/t/20915.aspx"&gt;http://community.qlik.com/forums/t/20915.aspx&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Sep 2009 21:21:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-09-30T21:21:27Z</dc:date>
    <item>
      <title>Previous Period</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Period/m-p/197061#M56874</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've got following datasources:&lt;/P&gt;&lt;P&gt;[CODE]Data:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Period, User, Value&lt;BR /&gt; P1, User1, 50&lt;BR /&gt; P1, User1, 50&lt;BR /&gt; P2, User1, 200&lt;BR /&gt; P2, User2, 200&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Calendar:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Period, PrevPeriod&lt;BR /&gt; P2, P1&lt;BR /&gt;];&lt;BR /&gt;[/CODE]&lt;/P&gt;&lt;P&gt;I want to produce following Pivot Table in a report:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 480; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext;"&gt;&lt;TBODY&gt;&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes;"&gt;&lt;TD style="padding-bottom: 0cm; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; padding-top: 0cm; mso-border-alt: solid windowtext .5pt; border: windowtext 1pt solid;" valign="top"&gt;&lt;P style="font-weight: bold; margin: 0cm 0cm 0pt; mso-bidi-font-weight: normal"&gt;Period&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom: windowtext 1pt solid; border-left: #d4d0c8; padding-bottom: 0cm; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0cm; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt;" valign="top"&gt;&lt;P style="font-weight: bold; margin: 0cm 0cm 0pt; mso-bidi-font-weight: normal"&gt;User&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom: windowtext 1pt solid; border-left: #d4d0c8; padding-bottom: 0cm; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0cm; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt;" valign="top"&gt;&lt;P style="font-weight: bold; margin: 0cm 0cm 0pt; mso-bidi-font-weight: normal"&gt;Value Sum on Current Period&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom: windowtext 1pt solid; border-left: #d4d0c8; padding-bottom: 0cm; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0cm; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt;" valign="top"&gt;&lt;P style="font-weight: bold; margin: 0cm 0cm 0pt; mso-bidi-font-weight: normal"&gt;Value Sum on Previous Period&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="mso-yfti-irow: 1;"&gt;&lt;TD style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; padding-right: 5.4pt; border-top: #d4d0c8; border-right: windowtext 1pt solid; padding-top: 0cm; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top"&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;P1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom: windowtext 1pt solid; border-left: #d4d0c8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; padding-right: 5.4pt; border-top: #d4d0c8; border-right: windowtext 1pt solid; padding-top: 0cm; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top"&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;User1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom: windowtext 1pt solid; border-left: #d4d0c8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; padding-right: 5.4pt; border-top: #d4d0c8; border-right: windowtext 1pt solid; padding-top: 0cm; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top"&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;100&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom: windowtext 1pt solid; border-left: #d4d0c8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; padding-right: 5.4pt; border-top: #d4d0c8; border-right: windowtext 1pt solid; padding-top: 0cm; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top"&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="mso-yfti-irow: 2;"&gt;&lt;TD style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; padding-right: 5.4pt; border-top: #d4d0c8; border-right: windowtext 1pt solid; padding-top: 0cm; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top"&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;P2&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom: windowtext 1pt solid; border-left: #d4d0c8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; padding-right: 5.4pt; border-top: #d4d0c8; border-right: windowtext 1pt solid; padding-top: 0cm; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top"&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;User1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom: windowtext 1pt solid; border-left: #d4d0c8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; padding-right: 5.4pt; border-top: #d4d0c8; border-right: windowtext 1pt solid; padding-top: 0cm; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top"&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;200&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom: windowtext 1pt solid; border-left: #d4d0c8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; padding-right: 5.4pt; border-top: #d4d0c8; border-right: windowtext 1pt solid; padding-top: 0cm; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top"&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;100&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="mso-yfti-irow: 3; mso-yfti-lastrow: yes;"&gt;&lt;TD style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; padding-right: 5.4pt; border-top: #d4d0c8; border-right: windowtext 1pt solid; padding-top: 0cm; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top"&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;P2&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom: windowtext 1pt solid; border-left: #d4d0c8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; padding-right: 5.4pt; border-top: #d4d0c8; border-right: windowtext 1pt solid; padding-top: 0cm; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top"&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;User2&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom: windowtext 1pt solid; border-left: #d4d0c8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; padding-right: 5.4pt; border-top: #d4d0c8; border-right: windowtext 1pt solid; padding-top: 0cm; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top"&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;200&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom: windowtext 1pt solid; border-left: #d4d0c8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; padding-right: 5.4pt; border-top: #d4d0c8; border-right: windowtext 1pt solid; padding-top: 0cm; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top"&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;As you can imagine, i've got problems generating data for the "Value Sum on Previous Period". I'm trying to use "Set Analysis" functionnality but without success by now.&lt;/P&gt;&lt;P&gt;Help would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2009 21:41:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Period/m-p/197061#M56874</guid>
      <dc:creator />
      <dc:date>2009-09-23T21:41:37Z</dc:date>
    </item>
    <item>
      <title>Previous Period</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Period/m-p/197062#M56875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A solution is to use the expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;above(sum(Value)) &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;for your 'Value Sum on Previous period'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2009 22:50:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Period/m-p/197062#M56875</guid>
      <dc:creator />
      <dc:date>2009-09-23T22:50:58Z</dc:date>
    </item>
    <item>
      <title>Previous Period</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Period/m-p/197063#M56876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It doesn't seem to produce expected behaviour:&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/6283.Sans-titre.PNG"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/6283.Sans-titre.PNG" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2009 23:28:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Period/m-p/197063#M56876</guid>
      <dc:creator />
      <dc:date>2009-09-23T23:28:17Z</dc:date>
    </item>
    <item>
      <title>Previous Period</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Period/m-p/197064#M56877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been struggling with the exact same issue for 2 days now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 00:13:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Period/m-p/197064#M56877</guid>
      <dc:creator />
      <dc:date>2009-09-24T00:13:35Z</dc:date>
    </item>
    <item>
      <title>Previous Period</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Period/m-p/197065#M56878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;anyone? anyone? Bueller? Bueeellleerrr?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 02:32:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Period/m-p/197065#M56878</guid>
      <dc:creator />
      <dc:date>2009-09-24T02:32:32Z</dc:date>
    </item>
    <item>
      <title>Previous Period</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Period/m-p/197066#M56879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't have a good solution, but I figured out a few things that may be worth it to share.&lt;/P&gt;&lt;P&gt;The reason Above(Sum(Value)) does not work on your sample, is because of the order of the dimensions. According to the documentation,&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;If the table or table equivalent has multiple vertical dimensions, the current&lt;BR /&gt;column segment will include only rows with the same values&lt;BR /&gt;as the current row in all dimension columns except for the column&lt;BR /&gt;showing the last dimension in the inter field sort order.&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Since Period is not the last dimension in the sort order, it is looking for the Above record where Period matches. In this case, you're getting the Above for P2 (200). If you switch the order and put User first, then you would get what you are looking for. Note: In a straight table, you can display Period as the first dimension, but put User first in the sort to get this to work. In a pivot, the only way is to put User as the first Dimension on that tab.&lt;/P&gt;&lt;P&gt;I tried to put User first in the Sort Order and then somehow sort by Period instead using the Sort By Expression, but I couldn't get it to work. That may be a possibility. EDIT: That is not a possibility, when you use a Sort By expression to sort by Period, the Above() function goes back to looking for matching Periods. If you can sort by User first, then problem solved, but that may not be ideal.&lt;/P&gt;&lt;P&gt;I tried quite a few other things with no luck. My advice would be to see if you can get the aggregate the data in your load and add PrevValue to each record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 04:23:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Period/m-p/197066#M56879</guid>
      <dc:creator />
      <dc:date>2009-09-24T04:23:23Z</dc:date>
    </item>
    <item>
      <title>Previous Period</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Period/m-p/197067#M56880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;NMiller wrote:&lt;BR /&gt;My advice would be to see if you can get the aggregate the data in your load and add PrevValue to each record.&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Thanks for your time on this subject.&lt;/P&gt;&lt;P&gt;If I use datetime formats instead of strings for the "Period" field, is there a way to solve this issue ? I'm looking for an equivalent to the ParallelPeriod MDX method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 16:36:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Period/m-p/197067#M56880</guid>
      <dc:creator />
      <dc:date>2009-09-30T16:36:11Z</dc:date>
    </item>
    <item>
      <title>Previous Period</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Period/m-p/197068#M56881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've never used the ParellelPeriod method, but it looks interesting. I'm not sure if you can use MDX in QlikView loads.&lt;/P&gt;&lt;P&gt;If you're looking to do something on the load script, you should be able to do it using QlikView functionality. Here is a sample that works using Inlines similar to your sample:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Data:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Period, Amount&lt;BR /&gt; P1, 50&lt;BR /&gt; P2, 60&lt;BR /&gt; P3, 70&lt;BR /&gt;];&lt;BR /&gt;Calendar:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Period, PrevPeriod&lt;BR /&gt; P1,&lt;BR /&gt; P2, P1&lt;BR /&gt; P3, P2&lt;BR /&gt;];&lt;BR /&gt;DataPrev:&lt;BR /&gt;LOAD Period As PrevPeriod, Amount As PrevAmount&lt;BR /&gt;RESIDENT Data;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I'm sure similar logic could be applied to loads from a database or other source.&lt;/P&gt;&lt;P&gt;Also, check out another recent thread that is trying to do something similar. The solution in that thread seemed to be to handle it in the load, so you may get some ideas: &lt;A href="http://community.qlik.com/forums/t/20915.aspx"&gt;http://community.qlik.com/forums/t/20915.aspx&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 21:21:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Period/m-p/197068#M56881</guid>
      <dc:creator />
      <dc:date>2009-09-30T21:21:27Z</dc:date>
    </item>
  </channel>
</rss>

