Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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