Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

s_santalucia
Contributor

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

Re: Date with set analysis

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])

4 Replies
jwjackso
Contributor III

Re: Date with set analysis

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
Contributor

Re: Date with set analysis

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

Re: Date with set analysis

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
Contributor

Re: Date with set analysis

yes, I have created the calendar in that way!

thanks for your answer!!!!!

Community Browser