Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
zakpullen
Creator
Creator

Count number of dates (including duplicates) higher than selected date

Hello,

I need to count the number dates (not distinct) higher than the selected date (MonthYear), i.e. how many are in the future. I've tried variations of below to no avail. I am happy that the date field formats are compatible, as I've evaluated this separately.

=Count({<[Temp.Valid Date] ={">MonthYear"}>}[Temp.Valid Date])

Many thanks

Labels (1)
5 Replies
BrunPierre
Partner - Master
Partner - Master

=Count({<[Temp.Valid Date]={">=$(=Max(MonthYear))"}>}[Temp.Valid Date])

zakpullen
Creator
Creator
Author

Thanks. It returns 0 like everything else I've tried.

deepanshuSh
Creator III
Creator III

Since the information is not provided regarding the dates column being used here, so I would be going with the basic idea.

sum(if (dates(datecolumn)>getselectedvalue(datefieldname),1,0))

Trial and error is the key to get unexpected results.
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Is there only one possible value for MonthYear?

-Rob

zakpullen
Creator
Creator
Author

Yes, it will be the selected MonthYear. It will always be the first of that month. Both sets of dates are formatted DD/MM/YYYY.