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: 
kfir1987
Contributor II
Contributor II

How to limit number of dimension ?

Hi,

I`m trying to limit my chart dimension results. My data contain 10 years, but on the default view (when no filter applied)  I want to show only the last 3 years. but in case the user chose a specific year, qlik will show only the selected years.

I just started to work with Qlik today, I will appreciate details explanation.

Thank you.

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

Instead of having just a field as a dimension you can filter what is coming from the field with some condition. Something like this:

If( Year >= Max(TOTAL Year)-3 , Year ) and then deselect "Include null values" for the dimension...

Underneath is a more sophisticated condition based on the selection to the left "All Years"... I have attached a demo app.

2018-06-20 17_51_29-Settings.png

View solution in original post

4 Replies
petter
Partner - Champion III
Partner - Champion III

Is it QlikView or Qlik Sense you are using?

kfir1987
Contributor II
Contributor II
Author

Qlik Sense

petter
Partner - Champion III
Partner - Champion III

Instead of having just a field as a dimension you can filter what is coming from the field with some condition. Something like this:

If( Year >= Max(TOTAL Year)-3 , Year ) and then deselect "Include null values" for the dimension...

Underneath is a more sophisticated condition based on the selection to the left "All Years"... I have attached a demo app.

2018-06-20 17_51_29-Settings.png

kfir1987
Contributor II
Contributor II
Author

Hi,

Thanks for your reply, it very helpful.

Your modification was correct only for half way, because when I try to choose more than 3 I can`t do that and in addition, I can see only the last 3 year from the highest year. for example: let's say I chose the years 2017, 2016 and 2009 - I will not see the year 2009 because this year is not one of 2017,2016,2015 (the configuration is 3 years before the max year that selected).

My request is to show last 3 years by default and if the user selected specific year/s to show them.

Thank You