Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

ashishpalkar
Contributor II

Count dates less than due dates.

Hi There

How to count dates from given list.    

From the attached sheet , I am looking for following solution.

HOW MANY CUSTOMERS HAVE PAID OF THEIR LOAN EARLIER THAN EXPECTED

Thanks ,     

1 Solution

Accepted Solutions
nitin_01
Contributor

Re: Count dates less than due dates.

Something new i learnt,  Thanks sunny .

Correction in expression : Count(DISTINCT {<loan_status = {'PAIDOFF'}, loan_ID = {"=paid_off_time < due_date"}>} loan_ID)


And it Works.

14 Replies
MVP
MVP

Re: Count dates less than due dates.

May be this

Count(DISTINCT {<loan_status = {'PAIDOFF'}, loan_ID = {"=Floor(paid_off_time) < due_date"}>} loan_ID)

ashishpalkar
Contributor II

Re: Count dates less than due dates.

Not worked, its giving '0' as output.

MVP
MVP

Re: Count dates less than due dates.

Are your dates and time stamps read as dual fields?

nitin_01
Contributor

Re: Count dates less than due dates.

or may be this

a Flag at backend : If(paid_off_time<due_date,1,0) as Flag

and expression as : =Count(DISTINCT {<loan_status={'PAIDOFF'},Flag={1}>} loan_ID)

Regards,

Nitin G.

MVP
MVP

Re: Count dates less than due dates.

nitin_01
Contributor

Re: Count dates less than due dates.

Hi sunny,

with due respect, I doubt in expression for the striked one would give desired result.

Count(DISTINCT {<loan_status = {'PAIDOFF'}, loan_ID = {"=Floor(paid_off_time) < due_date"}>} loan_ID)


Regards,

Nitin G.

MVP
MVP

Re: Count dates less than due dates.

Why not

nitin_01
Contributor

Re: Count dates less than due dates.

because within set analysis for

loan_ID={"=Floor(paid_off_time)<due_date"}

in this loan_ID has different data type whereas paid_off_time and due date are of different type, which wont give desired result as per my understanding.

Regards,

Nitin G.

MVP
MVP

Re: Count dates less than due dates.

Have you not used Search string in set analysis? May be read it here

Re: Why i am not getting same result with Above function ?