11 Replies Latest reply: Dec 19, 2012 11:12 AM by Joao Morais RSS

    What is wrong with this aggr()?

      Hi Qlik Helpers,



      I'm having an issue with an aggregation expression that doesn't fetch the expected results.


      Issue summary:


      1 - I'm looking at patients behaviour related to a treatment type (T1 and T2);

      2 - Patients may have 2 different categories or status: Naive patients ('N') and experienced patients ('E')

      3 - I want to count the distinct patients distribution over the treatment lifespan (Treatment Duration), by each Treatment Type and provided they have a record as Naïve patients ('N') at one of the periods available.


      The expressions reads ok if I select a single treatment type but it is wronge if both treatments are selected.


      Appreciate all your help.