Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
SI_NY02
Contributor III
Contributor III

If then question

I'm relatively new to Qlik and am looking for a way to write this formula

Active customers are defined as customers with Approved status who made a purchase in the same year/mo as when they opened the account.  I've written the below, but it doesn't seem to work.

 

if({<appl_status={'Approved'}>},(Count({<appl_status={'Approved'}>},{<customer_id = {"=[tran_date.autoCalendar.YearMonth]=[DateOpened.autoCalendar.YearMonth]"}>} distinct customer_id))

Labels (1)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master
Partner - Master

Maybe like this.

Count({<appl_status={'Approved'}, customer_id = {"=[tran_date.autoCalendar.YearMonth]=[DateOpened.autoCalendar.YearMonth]"}>} DISTINCT customer_id)

View solution in original post

2 Replies
BrunPierre
Partner - Master
Partner - Master

Maybe like this.

Count({<appl_status={'Approved'}, customer_id = {"=[tran_date.autoCalendar.YearMonth]=[DateOpened.autoCalendar.YearMonth]"}>} DISTINCT customer_id)

vinieme12
Champion III
Champion III

 

=count({<appl_status={'Approved'}>}  Distinct   

Aggr (  if(min([tran_date.autoCalendar.YearMonth])=min([DateOpened.autoCalendar.YearMonth]) , customer_id)   , customer_id))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.