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: 
Anonymous
Not applicable

Help with Set Analysis on a Table of Dimension Values

I have a dataset of recent outcome events for clinical trial subjects.  In my sheet I have placed a variable that restricts Subject ID values to those with outcome events that have been entered since some date.  Because of the if() statement in this table, when a subject is selected a selection is also made for the created date.

In a subsequent table I want to see ALL outcome events for the selected Subject.   If I clear the selection for the Created Date then all works as it should, but I don't want my users to have to do this if I can avoid it.

I have tried an aggr function with a set analysis that ignores the selection on created date on the second table, but I cannot get the results I am after.

I have attached a *.qvw with some sample data.

To reproduce my issue:

1. Select a Subject ID in the upper table.  You will see 4 medications in the second table

2. Clear the Outcome created Date selection (that was added automatically) and you should see 5 medications in the lower table.  One that was created before the vOutcomesSinceDate variable value.

What I want to achieve is for the second table to show all 5 meds when a Subject_ID is selected.

Any suggestions for other ways to do this are also welcome.

Thanks in advance.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Replace the dimension column Outcome_Created_Date with this measure: Max({<Outcome_Created_Date>}Outcome_Created_Date). And change the Number formatting setting to a date format of your choice.


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

Replace the dimension column Outcome_Created_Date with this measure: Max({<Outcome_Created_Date>}Outcome_Created_Date). And change the Number formatting setting to a date format of your choice.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

I'll be darned.  So what does that function do exactly?  I don't understand how that function ignores the selection of Outcome_Created_Date.  I..e there is no set operator there and so I though if there was none then a "$' was assumed.

Gysbert_Wassenaar

It's called set analysis. In this case it makes the expression disregard selections made in the field Outcome_Created_Date. It uses the inherited set (which is the same as the default set if the sheet doesn't have an alternative set assigned to it that the chart inherits) and that's why there's no '$' set selector. Inside the < > only the field name Outcome_Created_Date is listed without any records selector on the right side of an = character. That makes it ignore selections in that field. {< Outcome_Created_Field >} and {< Outcome_Created_Field= >} are functionally the same.

You can find more information about set analysis in this blog post: A Primer on Set Analysis


talk is cheap, supply exceeds demand