Qlik Community

Ask a Question

New to Qlik Sense

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

March 11, 2PM EST: Do More with Qlik - Getting Started wtih Qlik Sense SaaS - Redux. REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 

Count if Date > Variable

Hi, i'm trying to count all dates that are above a date stored in a variable, in my data load statement i have

Let vStartDate=date('01/04/2020');
Let vEndDate=date('01/07/2020');

In my sheet formula, i would then like to count all dates where the date in the field FinalReportDate is >= vStartDate

I've tried various examples on the forum but cant seem to get any to work, whats the correct syntax ?

2 Replies

try below 




Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.

Hi @DMG 

Try like below

Let vStartDate=date(MakeDate(2020,04,01));
Let vEndDate=date(MakeDate(2020,07,01));

In expression,

=count({<FinalReportDate={">=$(=vStartDate)<=$(=vEndDate)"}>}Distinct FinalReportDate)

Thanks & Regards,
Mayil Vahanan R