5 Replies Latest reply: Jan 29, 2014 7:01 PM by Lyndon Nelson RSS

    Can I use a variable (or expression result) in the below() function?

    Lyndon Nelson

      Hi,

       

        We have need to use the below() function in a straight table, but the n value as shown in example

      below([ total ] expression [ , offset [,n ]])

      needs to reference either a variable or a previous column in the straight table.

       

      The exact expression we are using is:

       

      max(aggr(rangesum(below(sum({<EXCLUDE_RECORD={''},STATION={'ON-STATION','T'},THREE_YEAR= {'-1'}>}QTY),0,OnTRR)),PARTNO,CAL_DATE))

       

      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.

       

      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.

       

      Any help/ideas would be appreciated. Thanks.