Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

1 Reply
hic
Former Employee
Former Employee

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