Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
bviswana
Contributor
Contributor

Date field comparision

I have a date field with MM/DD/YYYY format. I am trying this command and is not getting expected result

if (Year([END_DATE.autoCalendar.Year]) < Year('2019'),Count(NUMBER))

Basiccally, I need the count of NUMBER where the end date(year)  is < 2019 

Appreciate any help 

2 Solutions

Accepted Solutions
sunny_talwar

How about this may be

If(Year([END_DATE.autoCalendar.Year]) < 2019, Count(NUMBER))

or this

Count(If(Year([END_DATE.autoCalendar.Year]) < 2019, NUMBER))

View solution in original post

bviswana
Contributor
Contributor
Author

Count(If(Year([END_DATE.autoCalendar.Year]) < 2019, NUMBER)) - works. Thank You for the support

View solution in original post

2 Replies
sunny_talwar

How about this may be

If(Year([END_DATE.autoCalendar.Year]) < 2019, Count(NUMBER))

or this

Count(If(Year([END_DATE.autoCalendar.Year]) < 2019, NUMBER))
bviswana
Contributor
Contributor
Author

Count(If(Year([END_DATE.autoCalendar.Year]) < 2019, NUMBER)) - works. Thank You for the support