Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
tchovanec
Creator II
Creator II

Set Analysis Comparing two fields

I am trying to use the following set analysis but I am getting no results. Are you unable to compare one field to another?

 

COUNT

(
{<
ADMIT_DT= {">= $(=NUM(ADDMONTHS(MONTHSTART(DOB),12)))"}
>}
DISTINCT MRN
)

ADMIT_DT is a number. Any help would be greatly appreciated? Thank you




2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

ADMIN_DT and DOB shouldn't be dimensions in your chart. Set analysis expressions are calculated once per chart, not per row. You'll have to use an if statement instead if you use ADMIN_DT or DOB as a dimension in your chart and you don't select only one value. Something like :

COUNT(DISTINCT if(ADMIT_DT >= ADDMONTHS(MONTHSTART(DOB),12),MRN))


talk is cheap, supply exceeds demand
tchovanec
Creator II
Creator II
Author

Use an if statement where? I am unsure of what you are saying. Thanks.