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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Jamal
Contributor III
Contributor III

Count Distinct - Customer Cycle

Dear QlikView Experts,

I need to calculate :

1- count distinct  customer  with Datefin<= MakeDate($(vCurrentYear),$(vCurrentMonthNum),$(vCurrentDay))

Formula : count(distinct aggr(if(Datefin>0 and Datefin<= MakeDate($(vCurrentYear),$(vCurrentMonthNum),$(vCurrentDay)),[IDCLIENT]),[IDCLIENT],DATEPRODSQL))

2- Cumulative count of customers with Datefin <= MakeDate($(vCurrentYear),$(vCurrentMonthNum),$(vCurrentDay))

==> When I select year in dateField , I need to display all customers with datefin <= $(vCurrentYear)

3 - Returning Customer :

Formula :  count( distinct aggr(if(DATEPRODSQL > 0 and DATEPRODSQL > DATEFIN_LASTDOS AND DRetour<=360,[IDCLIENT]),[IDCLIENT],DATEPRODSQL))

Thank you for your help.

0 Replies