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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie
Contributor II
Contributor II

Set Analysis

I have below data:

Actual Data

Cust,type,trans_date,start_date,end_date

C1,W,01/02/2019,01/01/2019,01/31/2019

C2,W,02/06/2019,01/02/2019,02/28/2019

C1,W,01/03/2019,01/01/2019,01/31/2019

Result Data:

Cust,type,trans_date,Records_IN_DateRange

C1,W,01/02/2019,2

C2,W,02/06/2019,1

C1,W,01/03/2019,2

What will be the Set Analysis function for calculating Records_IN_DateRange column.

something like count({<trans_date ={ ">=start_date<=end_date" }>}1) for each row.

 

Labels (1)
2 Replies
sunny_talwar

How exactly are you getting 2 for the two C1s? Is it because there are two rows for C1 and for both the rows the trans_date falls between start and end date?

Newbie
Contributor II
Contributor II
Author

Yes