<?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 Pivot Table - Running Total in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pivot-Table-Running-Total/m-p/175158#M43718</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have running sum in my pivot table using"&lt;/P&gt;&lt;P&gt;Sum(Expression B) + IF(rowno()=0,0,above(Cumm))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Cumm" is the lable name I use for the expression that has the formula above in it.&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Sep 2009 22:06:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-09-03T22:06:41Z</dc:date>
    <item>
      <title>Pivot Table - Running Total</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Table-Running-Total/m-p/175157#M43717</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 have a pivot table with the following...&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;Customer&lt;/P&gt;&lt;P&gt;Expression A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;sum(IF(cam_FinQuarterYear = varBase AND cam_FinQuarterComplete = 'Yes' AND sin_SuperGroup='Core',sin_Sales,0))&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Expression B&lt;/P&gt;&lt;P&gt;=sum(IF(cam_FinQuarterYear = varComparison AND cam_FinQuarterComplete = 'Yes' AND sin_SuperGroup='Core',sin_Sales,0))&lt;/P&gt;&lt;P&gt;I would like to add two further expressions..&lt;/P&gt;&lt;P&gt;Expresssion C&lt;/P&gt;&lt;P&gt;Running total of Expression B&lt;/P&gt;&lt;P&gt;Expresssion D&lt;/P&gt;&lt;P&gt;Based on running total..&lt;/P&gt;&lt;P&gt;Categorise top 50% as "A", next 30% as "B" and last 20% as "C"...&lt;/P&gt;&lt;P&gt;I did see a post which referred to "Total" but I cannot get my head around it - possibly too late in the day for me...&lt;/P&gt;&lt;P&gt;Any help greatly appreciated...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2009 21:45:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Table-Running-Total/m-p/175157#M43717</guid>
      <dc:creator>pkelly</dc:creator>
      <dc:date>2009-09-03T21:45:04Z</dc:date>
    </item>
    <item>
      <title>Pivot Table - Running Total</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Table-Running-Total/m-p/175158#M43718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have running sum in my pivot table using"&lt;/P&gt;&lt;P&gt;Sum(Expression B) + IF(rowno()=0,0,above(Cumm))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Cumm" is the lable name I use for the expression that has the formula above in it.&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2009 22:06:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Table-Running-Total/m-p/175158#M43718</guid>
      <dc:creator />
      <dc:date>2009-09-03T22:06:41Z</dc:date>
    </item>
    <item>
      <title>Pivot Table - Running Total</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Table-Running-Total/m-p/175159#M43719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, for part two you need the following (I had the same type of issue when I had to create a pareto analysis)&lt;/P&gt;&lt;P&gt;if(Cumm/Rangesum(top(Expression B),1,noofrows()))&amp;gt;=.8.'C',if(Cumm/Rangesum(top(Expression B),1,noofrows()))&amp;gt;=.5.'B','A'))&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2009 22:21:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Table-Running-Total/m-p/175159#M43719</guid>
      <dc:creator />
      <dc:date>2009-09-03T22:21:20Z</dc:date>
    </item>
    <item>
      <title>Pivot Table - Running Total</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Table-Running-Total/m-p/175160#M43720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think sjcharles expressions are shorter than mine, but I'll post mine anyway.&lt;/P&gt;&lt;P&gt;For the running total, I used (the expression is labelled Running):&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;If(Above("Running")&amp;gt;0, Above("Running") + Sum(Sales), Sum (Sales))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The ranking was crazy. I couldn't get Rank(TOTAL &amp;lt;Customer&amp;gt; Sum(Sales)) to work, even though it seems like it should. Rank allows the TOTAL &amp;lt;field&amp;gt; according to the tool tip. Here's my expression (the expression is labelled Ranking):&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;If(Aggr(Rank(Sum(Sales)), Customer) / Count(DISTINCT TOTAL Customer)&amp;gt;.5, 'A',&lt;BR /&gt;If(Aggr(Rank(Sum(Sales)), Customer) / Count(DISTINCT TOTAL Customer)&amp;gt;.3, 'B',&lt;BR /&gt;If(Aggr(Rank(Sum(Sales)), Customer) / Count(DISTINCT TOTAL Customer)&amp;gt;0, 'C', Above("Ranking"))))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I would probably set up a variable to hold:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Aggr(Rank(Sum(Sales)), Customer) / Count(DISTINCT TOTAL Customer)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Which gets you a more respectable:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;If($(=vRank)&amp;gt;.5, 'A', If($(=vRank)&amp;gt;.3, 'B', If($(=vRank)&amp;gt;0, 'C', Above("Ranking"))))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;That is definitely no fun on a pivot table. &lt;IMG alt="Stick out tongue" src="http://community.qlik.com/emoticons/emotion-4.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2009 22:38:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Table-Running-Total/m-p/175160#M43720</guid>
      <dc:creator />
      <dc:date>2009-09-03T22:38:31Z</dc:date>
    </item>
    <item>
      <title>Pivot Table - Running Total</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Table-Running-Total/m-p/175161#M43721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Stephen...&lt;/P&gt;&lt;P&gt;Based on your example, I have added the following Dimension which has the header "Cumm"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;sum(IF(cam_FinQuarterYear = varComparison AND cam_FinQuarterComplete = 'Yes' AND sin_SuperGroup='Core',sin_Sales,0))&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;IF&lt;/P&gt;&lt;P&gt;(rowno()=0,0,above(Cumm))&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;What it is doing for me is giving me a total at the bottom of the pivot table but I am not seeing a running total beside each customer.&lt;/P&gt;&lt;P&gt;This may be down to my explanation of what I am trying to achieve...&lt;/P&gt;&lt;P&gt;I am hoping to see...&lt;/P&gt;&lt;P&gt;A B C&lt;/P&gt;&lt;P&gt;Joe Bloggs 80 100 100&lt;/P&gt;&lt;P&gt;Jim SMith 75 150 250&lt;/P&gt;&lt;P&gt;With C being my running total...&lt;/P&gt;&lt;P&gt;Thanks in advance for any assistance you can give me...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2009 22:38:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Table-Running-Total/m-p/175161#M43721</guid>
      <dc:creator>pkelly</dc:creator>
      <dc:date>2009-09-03T22:38:41Z</dc:date>
    </item>
    <item>
      <title>Pivot Table - Running Total</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Table-Running-Total/m-p/175162#M43722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have attached a small example.&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2009 23:00:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Table-Running-Total/m-p/175162#M43722</guid>
      <dc:creator />
      <dc:date>2009-09-03T23:00:05Z</dc:date>
    </item>
    <item>
      <title>Pivot Table - Running Total</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Table-Running-Total/m-p/175163#M43723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Stephen&lt;/P&gt;&lt;P&gt;Mine still isn't working properly and I think I may have found the reason why (although I am not sure why it is doing this)...&lt;/P&gt;&lt;P&gt;I added RowNo() to be both your example and mine as an expresssion...&lt;/P&gt;&lt;P&gt;In yours, it correctly reports the rows as being 1,2,3 etc...&lt;/P&gt;&lt;P&gt;On mine, it reports every row as being 1...&lt;/P&gt;&lt;P&gt;I cannot unfortunately post my file as it contains confidential company information and would take a while to reproduce using inline tables...&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Additional info...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have created a new report for playing.&lt;/P&gt;&lt;P&gt;I have restricted the output so that I have fewer records.&lt;/P&gt;&lt;P&gt;If I filter on the pivot table it works okay.&lt;/P&gt;&lt;P&gt;If I clear the filter I get...&lt;/P&gt;&lt;P&gt;Allocated Memory Exceeded&lt;/P&gt;&lt;P&gt;I have tentatively increased my limits on the QlikView Server Management Console with no success.&lt;/P&gt;&lt;P&gt;Hope this helps someone solve my issue...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2009 14:04:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Table-Running-Total/m-p/175163#M43723</guid>
      <dc:creator>pkelly</dc:creator>
      <dc:date>2009-09-04T14:04:33Z</dc:date>
    </item>
    <item>
      <title>Pivot Table - Running Total</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Table-Running-Total/m-p/175164#M43724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Some more additional info...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have been looking at other posts re memory and have found suggestions relating to flattening the tables...&lt;/P&gt;&lt;P&gt;In my model as it stands, I have three tables...&lt;/P&gt;&lt;P&gt;Calendar_Monthly, Customer and Sales Invoice&lt;/P&gt;&lt;P&gt;In my temp file I have flattened these so that I just have my Sales Invoice Table (I left joined the other two to this).&lt;/P&gt;&lt;P&gt;This has stopped the memory error but has left me with another issue as I am only left with transaction data.&lt;/P&gt;&lt;P&gt;I need to display all customers whether or not they have had sales or not but when I try to just flatten Sales Invoice and Calendar leaving me with Customer and Sales invoice I get the memory error (or sometime kicked out of QlikView)...&lt;/P&gt;&lt;P&gt;Again, any ideas greatly appreciated...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2009 17:19:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Table-Running-Total/m-p/175164#M43724</guid>
      <dc:creator>pkelly</dc:creator>
      <dc:date>2009-09-04T17:19:16Z</dc:date>
    </item>
  </channel>
</rss>

