Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Live chat with experts, bring your API Integration questions. June 15th, 10 AM ET. REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Master III
Master III

Hey you expression is much bulky..

Can you please explain what you want from your expression.

perumal_41
Partner
Partner

Hey,

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

Not applicable
Author

Please check the qvw attached in the initial post above.

Regards

perumal_41
Partner
Partner

Hi

when i select treatments Type i get this type report

this is correct or tell  which place coming worng value .

Not applicable
Author

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
Author

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
Author

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

Kind regards

Not applicable
Author

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

Kind regards

sujeetsingh
Master III
Master III

Hi,

Can you please explain that ...

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