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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
s_santalucia
Partner - Creator
Partner - Creator

Date with set analysis

Hello,

I have a question for you:

why does this formula not work?

count({$<[Data.autoCalendar.Year]={">2016"}>} [Num])


I want count [num] when data is > 2016.

Thanks

1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Not sure how you are defining your autoCalendar, but a lot of the time Year field is a Dual field created like this

Capture.PNG

If this is how you create it... then try this and see if this works for you

Count({$<[Data.autoCalendar.Year] = {">$(=YearStart(MakeDate(2016)))"}>} [Num])

View solution in original post

4 Replies
jwjackso
Specialist III
Specialist III

The formula worked for me.  Did you verify that [Data.autoCalendar.Year] is a 4 digit year and that you have data greater than 2016?

s_santalucia
Partner - Creator
Partner - Creator
Author

Yes, I have verified. it's like you say.

sunny_talwar
MVP
MVP

Not sure how you are defining your autoCalendar, but a lot of the time Year field is a Dual field created like this

Capture.PNG

If this is how you create it... then try this and see if this works for you

Count({$<[Data.autoCalendar.Year] = {">$(=YearStart(MakeDate(2016)))"}>} [Num])

s_santalucia
Partner - Creator
Partner - Creator
Author

yes, I have created the calendar in that way!

thanks for your answer!!!!!