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: 
Not applicable

last year count

Hi all,

I am trying to get the last year count using below expression.

Last year:

count({$<CanonicalDate = {">=$(=Yearstart(Max(CanonicalDate),-1)) <= $(=YearEnd(Max(CanonicalDate),-1))"},

DateType= {'invitation'}>} invitation_id)

Present Year:

count({$<CanonicalDate = {">=$(=Yearstart(Max(CanonicalDate)))  <= $(=Date(Max(CanonicalDate)))"},

DateType= {'invitation'}>} invitation_id) 

With last year expression i am getting the count till today.

Please check and help.

Regards,

pramod

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

I don't see anything obviously wrong. Can you post a Qlik Sense app (.qvf) that demonstrates the problem?


talk is cheap, supply exceeds demand
Not applicable
Author

please find qvf.

Not applicable
Author

I used below expression,

count({$<Year={$(=YEAR(TODAY())-1)}, DateType= {'invitation'}>} invitation_id)

I am getting the last year count,  I need to get count from particular date to end of the year.

For example:

from july 22 of 2014 to end of the year 2014.

I am declaring variable and assigned the date but how to take till end of the last year