12 Replies Latest reply: Apr 5, 2017 9:31 AM by omar bensalem RSS

    How to make a custom counter into if function when scripting

    moez ghattas

      Hello all,


      I'm new in Qliksense and  I need to make two counters like here .

      counter = 0

      counter1= 1

      if ([recurring.start_date] > [appointments.start_date] or [recurring.end_date]< [appointments.end_date])   and [recurring.kind]='open' then

      counter = counter+1;


      counter1= counter1 +1;

      end if ;

      there is two tables with  columns start and end dates .  ( recurring and appointment) one counter for the appointments withing recurrent dates and one counter for the appointments outside the recurrent  .

      i don't know if it works because i didn't find  the counters in the other views .

      i don't even know if this might be done in scripting part.