Skip to main content
Announcements
See why Qlik was named a Leader in the 2024 Gartner® Magic Quadrant™ for Data Integration Tools for the ninth year in a row: Get the report
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis chart expression overrides selection in chart dimensions

Hi everyone

I am trying to create a big table chart where I list services provided by multiple doctors over the years. The services in the data are grouped into "medication" and "examination".  For the time being I'm only interested in medication, so I select and locked that in a listbox. I would, however, like to know how many different patients have been treated by each doctor in each year, regardless of grouping, which is why I employed the following Set Analyses chart expression:

count({<Group={'Examination', 'Medication'}>} TOTAL <DoctorID, Year> Distinct PatientID)

This is supposed to write the total number of treated patients for each doctor in each year onto every row of the table. While the expression does what I want it to, it also messes with my chart. I found that it overrides my Group variable for the other dimensions too, which is not what I want. I want to keep all dimensions locked to Group = Medication and only have the patient-counting variable use the data from the Examination Group as well.

What am I doing wrong?

Thank you in advance

5 Replies
dplr-rn
Partner - Master III
Partner - Master III

Once you use the set analysis it overrides your selections

count({<Group={'Examination', 'Medication'}>} 

so here You are forcing the group to examination and medication.


i feel you will need another approach. maybe aggr?

vishsaggi
Champion III
Champion III

Not sure i fully understood can you share a sample app to look into and also your expected output you want to see.

TOTAL qualifier respects current selections when used in your expression. So may be try like:

Use Dim:

DoctorID

Year

Expr:

= Count({1<Group={'Examination', 'Medication'}>} Distinct PatientID)

Anonymous
Not applicable
Author

I would like for the expression code to ONLY override the selections for the expression column. Is this possible at all?

Anonymous
Not applicable
Author

Thank you for the suggestion. Unfortunately, it only gives me a blank table with "out of memory" in the middle.

What I'm after is for a way to only override the selection in my listboxes in the expression field, if that is possible.

dplr-rn
Partner - Master III
Partner - Master III

not clear what you mean. share a screenshot if possible