Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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?

1 Solution

Accepted Solutions
sunny_talwar

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

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

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

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

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?