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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
khaycock
Creator
Creator

Current Year on chart

I want a chart to automatically show this years data, regardless of the selection and can't figure it out at all. What is the best way to do this?

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

I think one of the parenthesis was missing

Count({1<Year = {"$(=Year(Today()))"}>}NCM_ID)


Capture.PNG

View solution in original post

10 Replies
sunny_talwar
MVP
MVP

May be use an expression like this:

Sum({<Year = {"$(=Year(Today())"}>}Sales)

khaycock
Creator
Creator
Author

The initial expression was Count(NCM_ID).

When I put the two together like Count({<Year = {"$(=Year(Today())"}>}NCM_ID) it doesnt work

sunny_talwar
MVP
MVP

Do you have a Year field in your application? Can you share more information of what you have?

Anonymous
Not applicable

Just adding to Sunny T response.

Count({1<Year = {"$(=Year(Today())"}>}NCM_ID)


It should work if you have a 'Year' field in your database.

khaycock
Creator
Creator
Author

It's just come up with Allocated memory exceeded now

sunny_talwar
MVP
MVP

Would you be able to share a sample?

khaycock
Creator
Creator
Author

This is the graph but with the allocated memory exceeded. Not sure what else I can do about it really?

sunny_talwar
MVP
MVP

I think one of the parenthesis was missing

Count({1<Year = {"$(=Year(Today()))"}>}NCM_ID)


Capture.PNG

khaycock
Creator
Creator
Author

It now doesn't change at all when any other selections are made, is that a thing?