Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

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.

Regards

11 Replies
sujeetsingh
Honored Contributor III

Re: What is wrong with this aggr()?

Hey you expression is much bulky..

Can you please explain what you want from your expression.

perumal_41
Valued Contributor II

Re: What is wrong with this aggr()?

Hey,

Tell me what  value  is expect in the experssion,give me sample.

Not applicable

Re: What is wrong with this aggr()?

Please check the qvw attached in the initial post above.

Regards

perumal_41
Valued Contributor II

Re: What is wrong with this aggr()?

Hi

when i select treatments Type i get this type report

this is correct or tell  which place coming worng value .

Not applicable

Re: What is wrong with this aggr()?

It's really simple to explain:

- From the entire set of patients included in the qvw sample I need to select only the ones that have a Naïve status ('N' value in the field Patient Status)

- After that, I need apply a distinct count along the Therapy Duration field, to conclude about how many of them are abandoning or switching the therapy as time goes by

Please find both the expected and current results in the qvw attached.

Thank you very much for your help.

Not applicable

Re: What is wrong with this aggr()?

Hi,

Thanks for your reply.

Regarding your question the anwser is No, the results are not correct.

Notice that if you perform a selection on T1 (listbox of Treatment Types) you'll get different results from Treatment Duration '2'  onwards.

Please check the qvw attached to get the details about current vs. expected results.

Thanks for your help

Regards

Not applicable

Re: What is wrong with this aggr()?

Please check an update of the sample data that better highlights the differences between current vs. expected results.

Kind regards

Not applicable

Re: What is wrong with this aggr()?

Please check an update of the sample data that better highlights the differences between current vs. expected results.

Kind regards

sujeetsingh
Honored Contributor III

Re: What is wrong with this aggr()?

Hi,

Can you please explain that ...

---according to dimensions Treatment Duration and Treatment Type you want the expression to give????

Community Browser