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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Display years dynamically

Hi Kaushik,

In my file i need to display last years in a single to variable based on one field, it should be dynamical changes.

In below to statement  is a field "DistinctCaptureDate", based on this field last 7 years should display.

Year(max(DistinctCaptureDate))-1  to  Year(max(DistinctCaptureDate))-7  should store in a single variable.

How can i work on this.

Pls check the attached QVW file.

Regards

Venkat

10 Replies
swuehl
MVP
MVP

Hi venkat,

as I said in my previous post, there is no connection between this list of 7 years and your DistinctCaptureDate.

We created a synthetic dimension, but no link to your data model.

If you want to filter your data for years, you can add a year field to your data model and filter this for say the last seven years (if you want to display all this seven years without having actual data, you can additionally add a calendar table to your data model). I posted a proposal for this to another of your postings yesterday.

It's pretty hard to tell what is the right solution for your needs, maybe you can tell us the business need or learning exercise detail description 😉

Regards,

Stefan