Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Bar chart (interview qstn)

Hi friends,

     I face done interview Question on Bar Chart. I am unable to solve that question please help me.

The Question is:

1) How to display the current selected year data and at the same time the next 5 years data on bar chart ?

EX:  I have 50 years of date like 1960 to 2010 . Then i select 2005 year then i go to display 2005 ,2006,2007,2008,2009,2010 data.

How it is ?how to display the only 5 years data in the bar chart. any expressions is there please conclude me.

3 Replies
PrashantSangle

Hi,

Use Year as dimension,

Expression become

Sum({<DateField={">=$(=Date(max(DateField)))<=$(=Date(AddYears(max(DateField),5)))"}>}sales)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
sushil353
Master II
Master II

Hi,

It is easy, Try below expression:

sum({<Year={">= $(=Max(Year)) <= $(=Max(Year)+5)"}>}value)

HTH

Sushil

SunilChauhan
Champion
Champion

see the attched

might helps

Sunil Chauhan