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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
tinkerz1
Creator II
Creator II

Date Greater than one year ago in setanalysis

Hi,

I am trying to count all the reference numbers in a set for the previous year from Todays date.

count({1<MonthLogged={">=$(DATE(Today()-365,'DD/MM/YYYY'))'"}>}ReferenceNumber)

I have formatted Today() into the same format and MonthLogged and expanded the formula.

What am I missing to make this work?

Thanks

Neil.

12 Replies
MK_QSL
MVP
MVP

You mean for same month previous year?

or

From previous year same month to till date?

sunny_talwar

May be this:

Count({1<MonthLogged={">=$(=Date(Today()-365,'DD/MM/YYYY'))'"}>}ReferenceNumber)

or

Count({1<MonthLogged={">=$(=Date(AddYears(Today(), -1),'DD/MM/YYYY'))'"}>}ReferenceNumber)

tinkerz1
Creator II
Creator II
Author

Hi Sunny,

Neither of those work.

Manish, it was 365 days prior to todays date.

sunny_talwar

What is the format for MonthLogged field?

tinkerz1
Creator II
Creator II
Author

Hi,

Its just,

DATE(floor(MonthEnd(LoggedDate)),'DD/MM/YYYY') as MonthLogged,


sunny_talwar

Give this a shot. Removed an extra single quote at the end

Count({1<MonthLogged={">=$(=Date(AddYears(Today(), -1),'DD/MM/YYYY'))"}>}ReferenceNumber)

MK_QSL
MVP
MVP

=Count({<MonthLogged = {">=$(=Date(AddYears(Today(),-1),'DD/MM/YYYY'))<=$(=Date(Today()))"}>}ReferenceNumber)

tinkerz1
Creator II
Creator II
Author

Hi,

I already took out the single quote

sunny_talwar

When you say its not working, is it showing error or its showing something which you did not expect?