6 Replies Latest reply: Jun 13, 2014 11:32 AM by KNIGHT Solidary RSS

    Set identifiers in a If statement

      Hi Everybody,

       

      I am a new QlikView developper and I have a problem.

       

      I load data in which there are three columns. The first column is registration_date and the second one is treatment_date and the last one is number_of_folder.

      I would like to sum the number_of_folder column every time where registration_date equal treatment_date.

      To do it I first wrote this statement :

      Sum( If([registration_date] = [treatment_date], [number_of_folder] )

      But I didn't work. I noticed that It's just because I had selected a range for registration_date and treatment_date both using a slider and It wasn't what I should do. I have to evaluate this activity without taking in account the selected treatment_date (It's used for another operation) but by using the selected registration_date

       

      So, I try this statement where I try to specify the full data set using Set Analysis statement by hoping that in the If Statement, the comparaison between the two column date will be base from the full data set not from the data set obtained after selecting date but it doesn't work.

       

      Sum( {1<[registration_date] = P([treatment_date]), [treatment_date]={"*"}>} If([registration_date]=[treatment_date], [number_of_folder]) )


      Please how could I do it ? Thanks.