7 Replies Latest reply: Jun 25, 2017 5:07 PM by Onno van Knotsenburg RSS

    Use set expression in load editor

    Petra Kostakova

      Hello,

      I use following expression in my app

       

      Count( {$<[date.autoCalendar.Year]={$(=max(Year(date)))}>}distinct ID)

       

      and it works fine, but I would like to define the set expression part in data load editor, because I reuse it many times and I want to export it easily.

      I tried

       

      Set

      MaxYear= '[date.autoCalendar.Year]={$(=max(Year(date)))}'
      in load editor and then use

      Count( {$<$(=MaxYear)>}distinct ID)

      but it does not work. The problem is with the inner function, which is not evaluated. Can anyone fix this problem?

      Combination

      Set

      MaxYear='[date.autoCalendar.Year]={2015}'

      and then

      Count( {$<$(=MaxYear)>}distinct ID)

      works fine, but I need to dynamically evaluate max(Year(date))

       

      Thank you in advance!

      Petra