<?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 Help using the &amp;quot;above&amp;quot; function in a pivot object. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144078#M505836</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;B&gt;if(above(CPvCCC)&amp;lt;&amp;gt;'',true(),false())&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Not that above just pick previous row, not previous column (for this you need to use before)&lt;B&gt;.&lt;BR /&gt;&lt;/B&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 May 2009 00:05:21 GMT</pubDate>
    <dc:creator>yblake</dc:creator>
    <dc:date>2009-05-14T00:05:21Z</dc:date>
    <item>
      <title>Help using the "above" function in a pivot object.</title>
      <link>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144077#M505835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to return a value based on a previous record in a pivot, but the "above: function does not seem to be working for me. Attached is a picture of what I am trying to do. Any ideas? Thanks! - Mike&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-247_sourceID:247" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 23:59:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144077#M505835</guid>
      <dc:creator />
      <dc:date>2009-05-13T23:59:22Z</dc:date>
    </item>
    <item>
      <title>Help using the "above" function in a pivot object.</title>
      <link>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144078#M505836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;B&gt;if(above(CPvCCC)&amp;lt;&amp;gt;'',true(),false())&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Not that above just pick previous row, not previous column (for this you need to use before)&lt;B&gt;.&lt;BR /&gt;&lt;/B&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 00:05:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144078#M505836</guid>
      <dc:creator>yblake</dc:creator>
      <dc:date>2009-05-14T00:05:21Z</dc:date>
    </item>
    <item>
      <title>Help using the "above" function in a pivot object.</title>
      <link>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144079#M505837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi yves,&lt;/P&gt;&lt;P&gt;I tried the above syntax, but it just returned all "True" values for each row. Any other suggestions? Thanks for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 00:21:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144079#M505837</guid>
      <dc:creator />
      <dc:date>2009-05-14T00:21:51Z</dc:date>
    </item>
    <item>
      <title>Help using the "above" function in a pivot object.</title>
      <link>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144080#M505838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you WANT to see happen in the Test column? Because my assumption was the same as yves. Since all CPvCCC values are filled in, it looks like you want true on every row but the first. Apparently that isn't what you're after. What ARE you after?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 01:12:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144080#M505838</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-05-14T01:12:59Z</dc:date>
    </item>
    <item>
      <title>Help using the "above" function in a pivot object.</title>
      <link>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144081#M505839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin:0in 0in 0pt;"&gt;I should have clarified. There is a column shown in the image in the first post named "CPvCCC Case Pack &amp;amp; Commodity Class Code (Packaging)&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;", this is the CPvCCC value… If the previous record for CPVCCC is the not the same as the current record for that column, then my expression should return False. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 23:42:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144081#M505839</guid>
      <dc:creator />
      <dc:date>2009-05-14T23:42:47Z</dc:date>
    </item>
    <item>
      <title>Help using the "above" function in a pivot object.</title>
      <link>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144082#M505840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about this?&lt;/P&gt;&lt;P&gt;=(CPvCCC=above(CPvCCC))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2009 01:26:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144082#M505840</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-05-15T01:26:23Z</dc:date>
    </item>
    <item>
      <title>Help using the "above" function in a pivot object.</title>
      <link>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144083#M505841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That didn't work either. Zeroes are returned on all rows.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 May 2009 02:13:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144083#M505841</guid>
      <dc:creator />
      <dc:date>2009-05-16T02:13:56Z</dc:date>
    </item>
    <item>
      <title>Help using the "above" function in a pivot object.</title>
      <link>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144084#M505842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works for me. See attached. You may need to post an example if you're still having trouble.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 May 2009 02:33:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144084#M505842</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-05-16T02:33:17Z</dc:date>
    </item>
    <item>
      <title>Help using the "above" function in a pivot object.</title>
      <link>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144085#M505843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/1184.above-function-in-pivot-2.JPG"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/1184.above-function-in-pivot-2.JPG" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks John. I downloaded your example, I am using the same syntax as you, but I am still getting zeroes. In your example, I slid the CPvCCC column to the right as the last dimesion of the pivot, and it returned zeroes like mine, yet it should still be returning -1 and 0s because some of the "above" records are different. Please see attached image. &lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/4130.above-function-in-pivot-2.JPG"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 May 2009 05:49:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144085#M505843</guid>
      <dc:creator />
      <dc:date>2009-05-16T05:49:13Z</dc:date>
    </item>
    <item>
      <title>Help using the "above" function in a pivot object.</title>
      <link>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144086#M505844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll always get zeroes if CPvCCC is the rightmost field. QlikView isn't literally just checking the value above the current row. From the help text, "Returns the value of expression evaluated with the chart's dimension values as they appear on the row above the current row within a column segment in a table..." The key point here is the mention of "column segment". If I remember correctly the column segment is ONLY that portion of the column that has the same values for all fields to the left. By making CPvCCC the rightmost field, you guaranted that either it is a different value in the same column segment, the same value in a different column segment, or a different value in a different column segment. All of these cases will return zero.&lt;/P&gt;&lt;P&gt;And, now that I'm looking more closely at your data, that IS the reason my expression wasn't working on your original data. Your fields to the left of CPvCCC appear to be unique values, which pretty much prevents above() from ever working. More accurately, I believe it will always return null on your chart. Sorry about that.&lt;/P&gt;&lt;P&gt;I'll let you know if I think of any approach that might work. Surely it's solvable, but right now, I'm not seeing the solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2009 22:40:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144086#M505844</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-05-18T22:40:53Z</dc:date>
    </item>
    <item>
      <title>Help using the "above" function in a pivot object.</title>
      <link>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144087#M505845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the tip. I finally got this resolved by creating a resident table using the previous function:&lt;/P&gt;&lt;P&gt;INNER JOIN&lt;BR /&gt; LOAD&lt;BR /&gt; CPvCCC AS CPvCCCx,&lt;BR /&gt; Daily_Production_Schedule.Production_Run_ID,&lt;BR /&gt; if(CPvCCC=previous(CPvCCC), '0', '1') as CPvCCCChange&lt;BR /&gt; RESIDENT DailyProduction;&lt;/P&gt;&lt;P&gt;I used the previous function to create a value of 1 if the change accorded. Then I inner joined back to the main table on Production Run ID, and just simply summed up all the "1"s to be found. The comparison of records within dimension groups was confusing, but once I understand that, I was able to come up with the resident table work around using the "previous" function. The key was to limit my data set down to two columns... Thanks for the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 May 2009 05:19:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-using-the-quot-above-quot-function-in-a-pivot-object/m-p/144087#M505845</guid>
      <dc:creator />
      <dc:date>2009-05-23T05:19:14Z</dc:date>
    </item>
  </channel>
</rss>

