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: 
krissy_s
Contributor III
Contributor III

Count records with one date before another

Hi All

I would like to count the number of records with a Cover Start date < Inception date. Both of these dates are dimensions which have already been created in QlikSense. I would this in a set analysis.

So far I have this, but it is not working:

[Cover Start Date] = {<$(=([%InceptionDate],'DD/MM/YYYY'))}

Can anyone help please?

Many thanks

 

 

 

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

This is the syntax I think you were looking for:

[Cover Start Date] = {"<$(=Date([%InceptionDate],'DD/MM/YYYY'))"}

This will work if %InceptionDate is a variable, or if there is only one possible value if  %InceptionDate is a field. Otherwise you may need something like:

[Cover Start Date] = {"<$(=Date(Max([%InceptionDate]),'DD/MM/YYYY'))"}

if this comparison is row by row (the %InceptionDate value is different in each row), then you will need a different approach which will depend on your requirements. 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
krissy_s
Contributor III
Contributor III
Author

Thank you for the reply.

Unfortunately the " " (see highlighted in red below) are causing an issue and it isn't working - any other ideas please??

{"<$(=Date(Max([%InceptionDate]),'DD/MM/YYYY'))"