4 Replies Latest reply: Oct 23, 2016 6:29 AM by Stefan Wühl RSS

    Set expression using "expression search" only evaluates in $ context

    Nathaniel Anderson

      Here's my test-data

      But the user could provide their own data;

      LOAD * INLINE [

          year, id    , col1, col2

          2012, 2012-1, 3, 5

          2013, 2013-1, 4, 4

          2014, 2014-1, 5, 3

          2012, 2012-2, 6, 2

          2013, 2013-2, 7, 1

          2014, 2014-2, 8, 0

      ];

       

       

      I want to get the id of ALL rows where col1<=col2

      But when I use this Set expression (with {1} for ALL), and the Set expression filter relies on an "expression search"...

      =CONCAT({1<id={'=col1<=col2'}>}DISTINCT id, '|')


      It doesn't seem to evaluate in the {1} all context where I want it to ignore the user's selections.

      i.e. it seems to evaluate in the {$} context.


      So instead of returning 2012-1, 2013-1

      It returns 2012-1 if the user's clicked 2012, 2013-1 if the user's clicked 2013, and only returns both 2012-1, 2013-1 (which is what I want), if the user deselects the year field.

       

      See the same in attached Qlikview.

       

      Is this behavior mentioned in the documentation? Am I making a mistake? Note the workarounds I considered, can you give me any alternatives?

       

       

      The Expression Search