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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
SI_NY02
Contributor III
Contributor III

Min Date and set analysis

I'm trying create a chart to answer the following question:

How many distinct customers, with date_type = 'Transaction Date', have placed their first order during any calendar year month. 

 

I've tried:

Count(aggr(If(tran_date = min(tran_date),({<DateType={'Transaction Date'} >}) distinct customer_id)

 

Labels (2)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master II
Partner - Master II

Try

=Count(distinct {$<DateType={'Transaction Date'}>} Aggr(If(tran_date = Min(total<customer_id> tran_date), customer_id), customer_id))

View solution in original post

3 Replies
SI_NY02
Contributor III
Contributor III
Author

Update...  corrected formula, does not show an error, but returns all 0.

Count(aggr(If(tran_date = min(tran_date),({<DateType={'Transaction Date'} >}),1), distinct customer_id))

BrunPierre
Partner - Master II
Partner - Master II

Try

=Count(distinct {$<DateType={'Transaction Date'}>} Aggr(If(tran_date = Min(total<customer_id> tran_date), customer_id), customer_id))

SI_NY02
Contributor III
Contributor III
Author

Thank you BrunPierre!