Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
MK9885
Master II
Master II

Greater than today date

Hi,

I've a requirement where I need to show the count where the dates are greater than today.

I've a field name ENDDDATE and I've to count the ENDDATE where it is greater than today date.

I've tried count({<Date={">=Today())>ENDDATE"}>}distinct( Dimension))

and

Count({$<ENDDATE={">=$(date(Today())"} >} Dimension) but the count doesn't matches for some reason.

Can anyone please help?

And my DateFormat='YYYY-MM-DD' both in script and master calendar.

stalwar1swuehlloveisfail

1 Solution

Accepted Solutions
sunny_talwar

Are you looking for a DISTINCT count of ENDDATE may be?

Count({$<ENDDATE = {">=$(=Date(Today(), 'YYYY-MM-DD'))"}>} DISTINCT ENDDATE)

View solution in original post

24 Replies
swuehl
MVP
MVP

Please have a look at

Dates in Set Analysis

Why don’t my dates work?

If you want to evaluate a function in dollar sign expansion, use a leading equal sign:

Count({$<ENDDATE={">=$(=date(Today(),'YYYY-MM-DD')"} >} Dimension)


and make sure that the ENDDATE field format matches the format of your formatted today's date


edit: Changed date format

sunny_talwar

Try this:

Count({$<ENDDATE = {">=$(=Date(Today(), 'YYYY-MM-DD'))"}>} Dimension)

MK9885
Master II
Master II
Author

Some of the values in my ENDDATES filed are for future

EX: 2017-05-12

      2017-08-21

So I want to count the future dates only

I've 4 month year

June-2016

July-2016

Aug-2016

Sep-2016

There is also a field STARTDATE but I only wanted to count those dates which has already passed from today.

sunny_talwar

Did this not work?

Count({$<ENDDATE = {">=$(=Date(Today(), 'YYYY-MM-DD'))"}>} Dimension)

MK9885
Master II
Master II
Author

No. The count is not matching with the end dates field.

It is also selecting 2016 dates

MK9885
Master II
Master II
Author

Attached is my Master calendar script and

I've changed the

SET DateFormat='YYYY-MM-DD'; in Main Tab of Script.

And my Date format in xl file are below.

 

2017-06-21
2017-06-22
2017-08-29
2017-09-26
2016-06-20
2016-06-24

Please let me know if i've to make any changes to it?

sunny_talwar

You want it to count everything greater than or equal to Oct 3rd 2016, right? Nov/Dec 2016 will still be counted? Or do you want to count stuff from 2017 onward?

MK9885
Master II
Master II
Author

I tried it and it doesn't work. Your expression is similar to Sunny's expression.

MK9885
Master II
Master II
Author

Greater than Today I want to count...

For today it should be > Oct3rd

For tomorrow it should be > Oct4th and so on...