Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

cancel
Showing results for 
Search instead for 
Did you mean: 
ashishpalkar
Creator III
Creator III

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
Creator
Creator

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.

View solution in original post

14 Replies
sunny_talwar

May be this

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

ashishpalkar
Creator III
Creator III
Author

Not worked, its giving '0' as output.

sunny_talwar

Are your dates and time stamps read as dual fields?

nitin_01
Creator
Creator

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.

nitin_01
Creator
Creator

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.

sunny_talwar

Why not

nitin_01
Creator
Creator

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.

sunny_talwar

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 ?