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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to count a field value within a date range?

Hi,

I would like to define an Expression to count a field value within a date range.

That is...

If start_date >= Jan 01, 2012 and <= Sept 30, 2012, then count (distinct [Login ID]).

Can someone please advise the correct syntax as I am a new user of QlikView.  Thank you.

Labels (1)
1 Reply
Anonymous
Not applicable
Author

Hi,

Something along these lines depending on your date formatting:

count({ $<start_date={'>01-01-2012<09-30-2012'}>} distinct [Login ID])

However, if you want to make the date range dynamic, for example, current year or similar, here's a thread with another example:

http://community.qlik.com/thread/55559