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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count values between two dates

Hey there,

hope you can help me. I thought it should be quite easy but either it is not or I am still too much of a beginner

Ich have a set of data regarding the acceptance tests of our machines containing amongst others a column with the date of acceptance test and a column with the number of the acceptance certificate.

Would I would like to display is the number of acceptance test conducted in the last 4 weeks. Therefore I created a variable "MonthBack" (today - 31 days) and this is what I tried without success:

=if([AC Results.Date]>=(MonthBack), Count([AC no.]))

The variable is ok and giving the correct date, but the code does not work.

Can anybody help?

Thanks a lot,

Max

1 Solution

Accepted Solutions
MayilVahanan

Hi

     Did you check both format is same . MonthBack and [AC Results.Date] ? If so,

     or use date(MonthBack,'DD/MM/YYYY') like this ..

    

     Count({<[AC Results.Date] = {'>=$(=MonthBack)'} >}[AC no.])

     Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

3 Replies
whiteline
Master II
Master II

=if([AC Results.Date]>='$(MonthBack)', Count([AC no.]))

MayilVahanan

Hi

     Did you check both format is same . MonthBack and [AC Results.Date] ? If so,

     or use date(MonthBack,'DD/MM/YYYY') like this ..

    

     Count({<[AC Results.Date] = {'>=$(=MonthBack)'} >}[AC no.])

     Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Perfect, that's it  - date format is both the same, but my code was wrong.

Big thanks!!