<?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: Can I use a variable (or expression result) in the below() function? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Can-I-use-a-variable-or-expression-result-in-the-below-function/m-p/387523#M563914</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The closest I have been able to come is making OnTRR a variable (no = )and using $(=$(OnTRR)) in the expression - BUT this takes a single value for OnTRR and uses that in the expression. Interestingly, I can simply put $(OnTRR) in an expression and it will show the correct value for each row. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something is flaky with using a variable in the below() function, I think. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone have any ideas???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 09 Mar 2013 00:31:00 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-03-09T00:31:00Z</dc:date>
    <item>
      <title>Can I use a variable (or expression result) in the below() function?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-I-use-a-variable-or-expression-result-in-the-below-function/m-p/387521#M563912</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;&amp;nbsp; We have need to use the below() function in a straight table, but the n value as shown in example&lt;/P&gt;&lt;P&gt;below([ total ] expression [ , offset [,n ]])&lt;/P&gt;&lt;P&gt;needs to reference either a variable or a previous column in the straight table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The exact expression we are using is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;max(aggr(rangesum(below(sum({&amp;lt;EXCLUDE_RECORD={''},STATION={'ON-STATION','T'},THREE_YEAR= {'-1'}&amp;gt;}QTY),0,OnTRR)),PARTNO,CAL_DATE))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where OnTRR is the variable I need to usee as it will be different for each PARTNO in the table. When I put 31 in place of OnTRR, the expression calculates correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried every possible combination I can think of with parenthesis, brackets, dollar expansion, column(), column name, etc, and nothing seems to work. I have tried searching the community as well, and didn't find any info on how to use a variable with the below() function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help/ideas would be appreciated. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 03:41:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-I-use-a-variable-or-expression-result-in-the-below-function/m-p/387521#M563912</guid>
      <dc:creator />
      <dc:date>2013-01-31T03:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use a variable (or expression result) in the below() function?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-I-use-a-variable-or-expression-result-in-the-below-function/m-p/387522#M563913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used all of these calls to the other expression (in the same chart) with no luck. Any other thoughts??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 103px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="19" width="103"&gt;OnTRR&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="19"&gt;=OnTRR&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="19"&gt;$OnTRR&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="19"&gt;(OnTRR)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="19"&gt;=(OnTRR)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="19"&gt;$(OnTRR)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="19"&gt;=(=(OnTRR))&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="19"&gt;=($OnTRR)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="19"&gt;=($(OnTRR))&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="19"&gt;$($On(TRR))&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="19"&gt;$(=OnTRR)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="19"&gt;$(=(OnTRR))&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="19"&gt;($($(OnTRR)))&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 20:01:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-I-use-a-variable-or-expression-result-in-the-below-function/m-p/387522#M563913</guid>
      <dc:creator />
      <dc:date>2013-02-06T20:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use a variable (or expression result) in the below() function?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-I-use-a-variable-or-expression-result-in-the-below-function/m-p/387523#M563914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The closest I have been able to come is making OnTRR a variable (no = )and using $(=$(OnTRR)) in the expression - BUT this takes a single value for OnTRR and uses that in the expression. Interestingly, I can simply put $(OnTRR) in an expression and it will show the correct value for each row. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something is flaky with using a variable in the below() function, I think. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone have any ideas???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Mar 2013 00:31:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-I-use-a-variable-or-expression-result-in-the-below-function/m-p/387523#M563914</guid>
      <dc:creator />
      <dc:date>2013-03-09T00:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use a variable (or expression result) in the below() function?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-I-use-a-variable-or-expression-result-in-the-below-function/m-p/387524#M563915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(#OnTRR)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 08:55:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-I-use-a-variable-or-expression-result-in-the-below-function/m-p/387524#M563915</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2013-03-11T08:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use a variable (or expression result) in the below() function?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-I-use-a-variable-or-expression-result-in-the-below-function/m-p/387525#M563916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried that, and a bunch more. The below() or above() functions do not seem to like a variable for the third paramenter, as in below(QTY,0,x) where x is the variable. If you would, take a look at my very much related posting &lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/315915#315915" title="http://community.qlik.com/message/315915#315915"&gt;http://community.qlik.com/message/315915#315915&lt;/A&gt; - there is an example program with data there that if you could fix, I would be ever indebted....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 21:47:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-I-use-a-variable-or-expression-result-in-the-below-function/m-p/387525#M563916</guid>
      <dc:creator />
      <dc:date>2013-04-03T21:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use a variable (or expression result) in the below() function?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-I-use-a-variable-or-expression-result-in-the-below-function/m-p/387526#M563917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I finally found a work around to this issue - not the most elegant solution but it works. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a working table with a key of the three dimensions composited together. Then I would loop through the chart, getting the calculated values for OnTRR and insert that into the working table via dynamic update. I then use the field in the working table in place of the OnTRR, and IT WORKS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone ever needs more detailed info, let me know. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 00:01:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-I-use-a-variable-or-expression-result-in-the-below-function/m-p/387526#M563917</guid>
      <dc:creator />
      <dc:date>2014-01-30T00:01:52Z</dc:date>
    </item>
  </channel>
</rss>

