Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

graham-crooks
New Contributor III

Ignoring a dimension value in an aggregated chart (akin to 'having' clause?)

To keep the explanation as simple as possible, I’ll describe it thus: I’m counting the number of times patients are admitted to a hospital.Hence:-

Dimension:

=aggr(sum({<set analysis in here>}AdmCounter),PatientID)

Expression:

count({<set analysis in here>}distinct PatientID)

And I get a very nice chart thankyou...

MultipleAdmitChart.png


However, for this example, I’m really not interested in the “1” column but I want all the others (akin to a sql “Having Count >=2” clause I guess). How can the “1” column be ignored please?  What do I write? Where do I put it? Any help very much appreciated.

2 Replies
MVP
MVP

Ignoring a dimension value in an aggregated chart (akin to 'having' clause?)

Either try:

=aggr(if(sum({<set analysis in here>}AdmCounter)>1,

sum({<set analysis in here>}AdmCounter))

,PatientID)

or

if(sum({<set analysis in here>}AdmCounter)>1,

count({<set analysis in here>}distinct PatientID) )

Hope this helps,

Stefan

graham-crooks
New Contributor III

Re: Ignoring a dimension value in an aggregated chart (akin to 'having' clause?)

Thanks Stefan. The first of the two suggestions appears to be the correct solution and works just fine:

=aggr(if(sum({<set analysis in here>}AdmCounter)>1,

sum({<set analysis in here>}AdmCounter))

,PatientID)

Many thanks.

Graham

Community Browser