Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 | Underweight | Normal | Overweight | Obese Class I | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Frequency of Registrations | Count | Total | % | Count | Total | % | Count | Total | % | Count | Total | % |
5 | 0 | 805 | 0.00 | 1 | 805 | 0.12 | 2 | 805 | 0.25 | 4 | 805 | 0.50 |
4 | 0 | 805 | 0.00 | 10 | 805 | 1.24 | 16 | 805 | 1.99 | 13 | 805 | 1.61 |
3 | 2 | 805 | 0.25 | 33 | 805 | 4.10 | 63 | 805 | 7.83 | 53 | 805 | 6.58 |
2 | 0 | 805 | 0.00 | 18 | 805 | 2.24 | 35 | 805 | 4.35 | 38 | 805 | 4.72 |
1 | 5 | 805 | 0.62 | 13 | 805 | 1.61 | 12 | 805 | 1.49 | 9 | 805 | 1.12 |
0 | 0 | 805 | 0.00 | 0 | 805 | 0.00 | 1 | 805 | 0.12 | 0 | 805 | 0.00 |
The above total values are incorrect and should actually display:
Frequency of Registrations | Count |
---|---|
5 | 15 |
4 | 94 |
3 | 354 |
2 | 210 |
1 | 105 |
0 | 27 |
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
Please post some data. Without the file it is impossible to see what you should do, or understand your formulas.
For instance: What is BenKey? And why use Aggr()?
But to answer your last question: You cannot have an expression within the <...>. You need to have a field.
HIC