1 Reply Latest reply: Oct 6, 2015 8:23 AM by Henric Cronström RSS

    Help with frequencies and percentages

      Hi,

       

      I am new to Qlikview and need some help.

      I need to display frequencies and then for a frequency the percentages of a population that fall within a specific group.

      BMI Group UnderweightNormal OverweightObese Class I
      Frequency of Registrations Count Total%Count Total%Count Total%Count Total%
      508050.0018050.1228050.2548050.50
      408050.00108051.24168051.99138051.61
      328050.25338054.10638057.83538056.58
      208050.00188052.24358054.35388054.72
      158050.62138051.61128051.4998051.12
      008050.0008050.0018050.1208050.00

      The above total values are incorrect and should actually display:

      Frequency of Registrations Count
      515
      494
      3354
      2210
      1105
      027

      For the frequencies in the table I have used the following expression:

      aggr(count(DiseaseID), BenKey)

      But then to calculate a total I need to use count(distinct total <.......>  if(StatusID=2,BenKey)) where in the <> I then quote the calculated expression aggr(count(DiseaseID), BenKey).

      How would I quote then quote this expression, if I simply paste in into the count expression between the <> it doesn't work.


      Thanks,

      James