3 Replies Latest reply: May 14, 2011 3:30 PM by S H RSS

    getcurrentfield() for Groups does not work when used with aggr() in Trellis Chart

      Background

      I created a stacked bar chart showing sales by product group over time. I then created a Trellis chart with region as a dimension. I found that the y-axis was too high, so I changed it to a static max with this expression: max(aggr(sum(sales), date, region)). Everything worked perfectly.

       

      Problem

      When I changed the dimension of the Trellis chart from region to a cyclic group containing region and business unit, I realized I'd need to change the expression above for the static max of my axis so that it would update based on the cyclic group selection. I changed the expression to this: max(aggr(sum(sales), date, getcurrentfield(groupname))) where 'groupname' was the name of the group I created. This did not work, and the y-axis max did not change.

       

      Is my expression for the static max of the y-axis off the mark or is there some kind of bug with QlikView?