Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show only subset of years (dimension in barchart)

Hi,

I am making a bar chart with year as dimension. I have data fro 15 years, but i only want to show bars for 3 out of these 15 years, How do I do that?

Thanks for the help.

3 Replies
Anonymous
Not applicable
Author

Marc,

It depends on the details what exactly you're trying to show.  Generic answer to your generic question:
Use calculated dimension with "if" condition or with set analysis limiting years, and use "suppress when null" for this dimension
or
Use conditions or set analysis to limit years in all expressions, in combinatiion with "suppress 0 values"

Regards,
Michael

Edit: Or create additional "Limited Year" dimension in the script and use it in your bar chart.  This one is best for the front end performance, if it matters in your case.

sivarajs
Specialist II
Specialist II

Hi,

you can do it using Presentation-->max values to show

But make sure that you are showing asec or desc values

Sivaraj S

Not applicable
Author

Hi Marc,

use a set analysis like this

=sum({<year={2000,2001,2002}>}sales)

so it will show bars of these three years 2000,2001,2002 when you have sales by year

of sevral years like 2000,2001,2002,2003,2004.

warm regards,

Anant Dubey