4 Replies Latest reply: Sep 10, 2017 7:22 PM by Sunny Talwar RSS

    Using OR/IF function in Set Expression

    Mohammed Al Radi

      Dear Qlik Community,

       

      I hope this finds you well. I am currently working on a data set that consists of 3 fields (Trainee ID, Economic Literacy Score, Value Chains Test Score).

       

      I have the following set expression:

       

      Count({$<[Value Chains Test Score]={'>=7'},  [Economic Literacy Score]={'>=7'}>}[Trainee ID])

       

      This expression gives me the # Trainees that took both Value Chains & Economic Literacy trainings and scored >7 in both. It is worth nothing that all trainees take both trainings.

       

      I would like to amend it to say: Count the number of Trainees (distinct without repetition) that scored at least 7 in either the 'Value Chains training' or Economic Literacy training'. I can't seem to get the syntax right for it though. Or perhaps this is best answered using addition and a distinct function that covers both parts of the addition expression?

       

      If anything comes to mind I would be most appreciative.

       

      Best,

       

      Mohammed