<?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 Re: Using Above/Below functions in Expressions on a table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323709#M586484</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, as an extension of the workaround, you can generate the if() or pick(match()) as a variable.&amp;nbsp; In the attached example, I use a table of metrics vs. expressions to generate the pick(match()) version.&amp;nbsp; This should work the same with an actual data table as input instead of the inline load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does seem there should be a better way, but this works, at least in a simple example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies if I'm still not quite grasping the situation.&amp;nbsp; I don't have your dimension type and default expression in the example, but they seem like they'd be easy to add.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Aug 2011 23:39:42 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2011-08-01T23:39:42Z</dc:date>
    <item>
      <title>Using Above/Below functions in Expressions on a table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323706#M586481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having trouble using the Above and Below functions in a straight table. Basically there is a number of different Formula Expressions (being my above/below formulas) and each is specific to a particular dimension value. i.e. Each dimension value that has a formula only has one formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in it's most basic form my table might look like;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Dimension&lt;/SPAN&gt;, &lt;SPAN style="text-decoration: underline;"&gt;Amount&lt;/SPAN&gt;, &lt;SPAN style="text-decoration: underline;"&gt;Formula Expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sales, 2000, -&lt;/P&gt;&lt;P&gt;Additional Sales, 1000, -&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Total Sales, 3000, above(sum(sales), 2)+above(sum(sales), 1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Sales Quantity, 30, -&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Average Price, 100, (above(sum(sales),4)+above(sum(sales),3))/above(sum(sales),1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NB: The 3000 and 100 are the values i would expect to see.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If i show the formulas as they are (i.e. not evaluating them) they show the correct fomula on both the bold lines as i have writen above.&lt;/P&gt;&lt;P&gt;If i evaluate the formulas however by using &lt;EM&gt;$(=[Formula Expression])&lt;/EM&gt; it shows '-' for both of the calculated dimensions. &lt;/P&gt;&lt;P&gt;If however i filter the table to only contain 1 Dimension with a Formula Expression (i.e. select lines Sales through Sales Quantity), it calculates correctly. It's only when there is more than 1 dimension displayed on the table with a Formula Expression that the evaluated value shown is '-'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how I can achieve the result needed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 22:20:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323706#M586481</guid>
      <dc:creator />
      <dc:date>2011-08-01T22:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using Above/Below functions in Expressions on a table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323707#M586482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dollar sign expansion is done outside of the context of the dimensions.&amp;nbsp; Since there are multiple values for the formula expression, you can expect it to return null UNLESS a single dimension is selected, because only when a single dimension is selected does your formula have a single value that can then be evaluated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have the solution for you, unfortunately.&amp;nbsp; I could swear I've seen a clever solution, but I don't seem to have it among my saved examples, and I can't think how you'd do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;A workaround might be to do it with a nested if() or a pick(match()).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if(Dimension='Total Sales'&amp;nbsp; ,above(sum(sales),2)+above(sum(sales),1),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if(Dimension='Average Price',above(sum(sales),4)+above(sum(sales),3))/above(sum(sales),1)))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;pick(match(Dimension,'Total Sales','Average Price')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,above(sum(sales),2)+above(sum(sales),1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,above(sum(sales),4)+above(sum(sales),3))/above(sum(sales),1))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 22:40:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323707#M586482</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-08-01T22:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using Above/Below functions in Expressions on a table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323708#M586483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John, both of those solutions worked and would be very useful if my table was as simple as my example above. Unfortunately we had shied away from hard coding the formuals because of both the number needed and the reasons outlined below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason i would prefer the Formula Expression not to be hard coded is becasue we are retrieving it from a template inside our data source (our ERP system) so users can manage (make, alter, etc.) the table layouts in the ERP and the template is then exported to Qlikview and interpreted as appropriate. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We therefore enter the above/below formulas in the template in our ERP system and give it a 'Formula' tag so when its imported into Qlikview we had our Expressions as;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if([Dimension Type]='Formula'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;EM&gt;$(=(Formula Expression))&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sum(sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;As you say however this only works if there is only one formula being calculated in the table. I do know however that it is retrieving the correct formula for each dimension as if we dont use the dollar sign to expand the Formula Expression, then each dimension row that is a formula has the correct Formula Expression displayed as text. It's as if i need to validate the dimension somehow first before retrieving the Formula Expression of that dimension.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Hopefully someone has resolved this one way or another and will respond.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Thanks again&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 23:19:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323708#M586483</guid>
      <dc:creator />
      <dc:date>2011-08-01T23:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using Above/Below functions in Expressions on a table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323709#M586484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, as an extension of the workaround, you can generate the if() or pick(match()) as a variable.&amp;nbsp; In the attached example, I use a table of metrics vs. expressions to generate the pick(match()) version.&amp;nbsp; This should work the same with an actual data table as input instead of the inline load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does seem there should be a better way, but this works, at least in a simple example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies if I'm still not quite grasping the situation.&amp;nbsp; I don't have your dimension type and default expression in the example, but they seem like they'd be easy to add.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 23:39:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323709#M586484</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-08-01T23:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using Above/Below functions in Expressions on a table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323710#M586485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the same basic idea, but trying to guess at your basic data structure.&amp;nbsp; It doesn't seem right to use sum(Sales) as your Sales Quantity, so I suspect I misunderstood something in that regard.&amp;nbsp; Anyway, it's generating the numbers for your example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit:&amp;nbsp; To simplify the formulas and avoid recalculating data, you could name the column "Result" and then refer to that in the above().&amp;nbsp; See version 4, attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Aug 2011 00:06:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323710#M586485</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-08-02T00:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using Above/Below functions in Expressions on a table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323711#M586486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks John,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Those examples look like they could be a good solution for what we are after. I will get into them in the coming days, make the appropriate changes for our data and let you know how we get on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Aug 2011 00:22:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323711#M586486</guid>
      <dc:creator />
      <dc:date>2011-08-02T00:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using Above/Below functions in Expressions on a table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323712#M586487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;John is probably referring to this solution &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://community.qlik.com/thread/18416"&gt;http://community.qlik.com/thread/18416&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 11:32:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323712#M586487</guid>
      <dc:creator />
      <dc:date>2011-08-09T11:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using Above/Below functions in Expressions on a table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323713#M586488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;sailor wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;John is probably referring to this solution &lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/thread/18416"&gt;http://community.qlik.com/thread/18416&lt;/A&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hmmm, I don't think so.&amp;nbsp; Not to say that it isn't a clever solution, but it's simply another variation of the same pick() solution we've been discussing.&amp;nbsp; I thought I had once seen a way to actually make QlikView evaluate the expressions directly.&amp;nbsp; I could be wrong.&amp;nbsp; Maybe it's a case where it seems so much that there &lt;EM&gt;should&lt;/EM&gt; be a way that I imagine I once saw a way, even though I didn't.&amp;nbsp; Who knows.&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 16:51:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323713#M586488</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-08-09T16:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using Above/Below functions in Expressions on a table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323714#M586489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="color: #333333; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 10pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ;"&gt;The problem comes with using a second dimension. The above() function does then know no further rows above, because it looks for a row above within the same group, based on the sort order of the dimensions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="color: #333333; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 10pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="color: #333333; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 10pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ;"&gt;The straight will look like this with the pick function:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="width: 100%; border-collapse: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt;" width="100%"&gt;&lt;SPAN style="font-family: Times New Roman;"&gt; &lt;/SPAN&gt;&lt;TBODY&gt;&lt;TR style="height: 12.75pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes;"&gt;&lt;SPAN style="font-family: Times New Roman;"&gt; &lt;/SPAN&gt;&lt;TD style="padding: 0cm 5.4pt; border: 1pt solid windowtext; width: 6.1%; height: 12.75pt; background-color: transparent; mso-border-alt: solid windowtext .5pt;" valign="bottom" width="6%"&gt;&lt;SPAN style="font-family: Times New Roman;"&gt; &lt;/SPAN&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;STRONG style="mso-fareast-language: EN-NZ; : ; mso-bidi-font-size: 10.0pt; font-size: 8pt; Times New Roman&amp;amp;quot: ; sans-serif&amp;amp;quot: ; font-family: &amp;amp;quot; Arial&amp;amp;quot: ; mso-fareast-font-family: &amp;amp;quot; ,&amp;amp;quot: ;"&gt;Dimension&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 1pt 1pt 1pt 0px; border-style: solid solid solid none; border-color: windowtext windowtext windowtext #000000; padding: 0cm 5.4pt; width: 3.22%; height: 12.75pt; background-color: transparent; mso-border-top-alt: solid windowtext .5pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="bottom" width="3%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;STRONG style="mso-fareast-language: EN-NZ; : ; mso-bidi-font-size: 10.0pt; font-size: 8pt; Times New Roman&amp;amp;quot: ; sans-serif&amp;amp;quot: ; font-family: &amp;amp;quot; Arial&amp;amp;quot: ; mso-fareast-font-family: &amp;amp;quot; ,&amp;amp;quot: ;"&gt;Line No&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 1pt 1pt 1pt 0px; border-style: solid solid solid none; border-color: windowtext windowtext windowtext #000000; padding: 0cm 5.4pt; width: 5%; height: 12.75pt; background-color: transparent; mso-border-top-alt: solid windowtext .5pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="bottom" width="5%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;STRONG style="mso-fareast-language: EN-NZ; : ; mso-bidi-font-size: 10.0pt; font-size: 8pt; Times New Roman&amp;amp;quot: ; sans-serif&amp;amp;quot: ; font-family: &amp;amp;quot; Arial&amp;amp;quot: ; mso-fareast-font-family: &amp;amp;quot; ,&amp;amp;quot: ;"&gt;Amount&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 1pt 1pt 1pt 0px; border-style: solid solid solid none; border-color: windowtext windowtext windowtext #000000; padding: 0cm 5.4pt; width: 48.94%; height: 12.75pt; background-color: transparent; mso-border-top-alt: solid windowtext .5pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="bottom" width="48%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;STRONG style="mso-fareast-language: EN-NZ; : ; mso-bidi-font-size: 10.0pt; font-size: 8pt; Times New Roman&amp;amp;quot: ; sans-serif&amp;amp;quot: ; font-family: &amp;amp;quot; Arial&amp;amp;quot: ; mso-fareast-font-family: &amp;amp;quot; ,&amp;amp;quot: ;"&gt;Formula Expression (not working)&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 1pt 1pt 1pt 0px; border-style: solid solid solid none; border-color: windowtext windowtext windowtext #000000; padding: 0cm 5.4pt; width: 36.74%; height: 12.75pt; background-color: transparent; mso-border-top-alt: solid windowtext .5pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="bottom" width="36%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;STRONG style="mso-fareast-language: EN-NZ; : ; mso-bidi-font-size: 10.0pt; font-size: 8pt; Times New Roman&amp;amp;quot: ; sans-serif&amp;amp;quot: ; font-family: &amp;amp;quot; Arial&amp;amp;quot: ; mso-fareast-font-family: &amp;amp;quot; ,&amp;amp;quot: ;"&gt;Formula Expression (working)&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 63.75pt; mso-yfti-irow: 1;"&gt;&lt;TD style="border-width: 0px 1pt 1pt; border-style: none solid solid; border-color: #000000 windowtext windowtext; padding: 0cm 5.4pt; width: 6.1%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt;" valign="top" width="6%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;Sales&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 3.22%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="3%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 5%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="5%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;2000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 48.94%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="48%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;pick([Line&amp;nbsp;&amp;nbsp; No],sum(sales),sum(sales),above(sum(sales),2)+above(sum(sales),1)&lt;BR /&gt; ,sum(quantity),(above(sum(sales),4)+above(sum(sales),3))/above(sum(quantity),1))&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 36.74%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="36%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;pick([Line No],sum(sales),sum(sales),above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(sales),2)+above(&lt;STRONG&gt;TOTAL &lt;/STRONG&gt;sum(sales),1)&lt;BR /&gt; ,sum(quantity),(above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(sales),4)+above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(sales),3))/above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(quantity),1))&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 63.75pt; mso-yfti-irow: 2;"&gt;&lt;TD style="border-width: 0px 1pt 1pt; border-style: none solid solid; border-color: #000000 windowtext windowtext; padding: 0cm 5.4pt; width: 6.1%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt;" valign="top" width="6%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;Additional Sales&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 3.22%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="3%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 5%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="5%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 48.94%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="48%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;pick([Line&amp;nbsp;&amp;nbsp; No],sum(sales),sum(sales),above(sum(sales),2)+above(sum(sales),1)&lt;BR /&gt; ,sum(quantity),(above(sum(sales),4)+above(sum(sales),3))/above(sum(quantity),1))&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 36.74%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="36%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;pick([Line No],sum(sales),sum(sales),above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(sales),2)+above(&lt;STRONG&gt;TOTAL &lt;/STRONG&gt;sum(sales),1)&lt;BR /&gt; ,sum(quantity),(above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(sales),4)+above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(sales),3))/above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(quantity),1))&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 63.75pt; mso-yfti-irow: 3;"&gt;&lt;TD style="border-width: 0px 1pt 1pt; border-style: none solid solid; border-color: #000000 windowtext windowtext; padding: 0cm 5.4pt; width: 6.1%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt;" valign="top" width="6%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;Total Sales&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 3.22%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="3%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;3&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 5%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="5%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;3000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 48.94%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="48%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;pick([Line&amp;nbsp;&amp;nbsp; No],sum(sales),sum(sales),above(sum(sales),2)+above(sum(sales),1)&lt;BR /&gt; ,sum(quantity),(above(sum(sales),4)+above(sum(sales),3))/above(sum(quantity),1))&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 36.74%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="36%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;pick([Line No],sum(sales),sum(sales),above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(sales),2)+above(&lt;STRONG&gt;TOTAL &lt;/STRONG&gt;sum(sales),1)&lt;BR /&gt; ,sum(quantity),(above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(sales),4)+above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(sales),3))/above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(quantity),1))&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 63.75pt; mso-yfti-irow: 4;"&gt;&lt;TD style="border-width: 0px 1pt 1pt; border-style: none solid solid; border-color: #000000 windowtext windowtext; padding: 0cm 5.4pt; width: 6.1%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt;" valign="top" width="6%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;Sales Quantity&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 3.22%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="3%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;4&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 5%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="5%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;30&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 48.94%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="48%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;pick([Line&amp;nbsp;&amp;nbsp; No],sum(sales),sum(sales),above(sum(sales),2)+above(sum(sales),1)&lt;BR /&gt; ,sum(quantity),(above(sum(sales),4)+above(sum(sales),3))/above(sum(quantity),1))&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 36.74%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="36%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;pick([Line No],sum(sales),sum(sales),above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(sales),2)+above(&lt;STRONG&gt;TOTAL &lt;/STRONG&gt;sum(sales),1)&lt;BR /&gt; ,sum(quantity),(above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(sales),4)+above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(sales),3))/above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(quantity),1))&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 63.75pt; mso-yfti-irow: 5; mso-yfti-lastrow: yes;"&gt;&lt;TD style="border-width: 0px 1pt 1pt; border-style: none solid solid; border-color: #000000 windowtext windowtext; padding: 0cm 5.4pt; width: 6.1%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt;" valign="top" width="6%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;Average Price&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 3.22%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="3%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;5&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 5%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="5%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;100&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 48.94%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="48%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;pick([Line&amp;nbsp;&amp;nbsp; No],sum(sales),sum(sales),above(sum(sales),2)+above(sum(sales),1)&lt;BR /&gt; ,sum(quantity),(above(sum(sales),4)+above(sum(sales),3))/above(sum(quantity),1))&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: #000000 windowtext windowtext #000000; padding: 0cm 5.4pt; width: 36.74%; height: 63.75pt; background-color: transparent; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt;" valign="top" width="36%"&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-bidi-font-size: 10.0pt;"&gt;pick([Line No],sum(sales),sum(sales),above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(sales),2)+above(&lt;STRONG&gt;TOTAL &lt;/STRONG&gt;sum(sales),1)&lt;BR /&gt; ,sum(quantity),(above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(sales),4)+above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(sales),3))/above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; sum(quantity),1))&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="color: #333333; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 10pt; display: none; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ; mso-hide: all;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="color: #333333; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 10pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ;"&gt;&lt;BR /&gt; When a &lt;STRONG&gt;TOTAL &lt;/STRONG&gt;qualifier is added (fifth column), the entire column will be regarded as one column segment. The second dimension (here [Line No.]) can then also be flagged as hidden, because it is used only to pick the desired expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="color: #333333; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 10pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"&gt;&lt;SPAN style="color: #333333; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 10pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ;"&gt;You might simplify the pick expression by using match, if there is a kind of default expression for most of the rows. I’m wondering if there is a max character length for expressions?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;&lt;SPAN style="color: #333333; line-height: 115%; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 10pt; mso-fareast-font-family: &amp;amp;quot;Times New Roman&amp;amp;quot;; mso-fareast-language: EN-NZ;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 10:01:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Above-Below-functions-in-Expressions-on-a-table/m-p/323714#M586489</guid>
      <dc:creator />
      <dc:date>2011-08-10T10:01:09Z</dc:date>
    </item>
  </channel>
</rss>

