Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sonysree88
Creator II
Creator II

how to write the expression to get dynamic chart

Hi All,

I have one filed that Year: 2000

2001,

2002

2003

 

...

...

...

and so on 2010

 

Based on the user selection previous years data needs to be displayed.

for example: user selects 2003 so it needs to be displayed the previous years data means 2001 and 2002 data should get displayed.

if user selects 2006 , needs to get displayed 2001 to 2005 data not all , only the previous years data based on selection

 

Can you please help me on it.

 

Labels (1)
2 Solutions

Accepted Solutions
agni_gold
Specialist III
Specialist III

Please find sample app , and below expression will help you 

 

sum({<Year={">=$(=min({1}Year)) <$(=GetFieldSelections(Year))"}>}Amount)

 

View solution in original post

anushree1
Specialist II
Specialist II

Please check if this works

View solution in original post

6 Replies
uacg0009
Partner - Specialist
Partner - Specialist

Hi,
1.When user select 2003, only show 2001, 2002? no 2003?
2.When user select 2006, only show 2001 to 2005? no 2006?

3.If user select more than 1 year, like 2003 and 2004, or 2003 and 2006, what year should be show?


Aiolos Zhao

Anil_Babu_Samineni

PFA

Sum({<Year={">=$(=Min({1}Year))<$(=Max(Year))"}>} Sales)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
agni_gold
Specialist III
Specialist III

Please find sample app , and below expression will help you 

 

sum({<Year={">=$(=min({1}Year)) <$(=GetFieldSelections(Year))"}>}Amount)

 

sonysree88
Creator II
Creator II
Author

Hi ,

If user select more than 1 year, like 2003 and 2004, or 2003 and 2006, what year should be show?

 

..If user selects 2003 and 2004--only 2001 , 2002 for 2003 selection and 2001,2002,2003 for 2014 selection

agni_gold
Specialist III
Specialist III

i would say , if user select more than one year , please show min to max data .

if 2003 and 2006 selected then show from 2003 to 2006
anushree1
Specialist II
Specialist II

Please check if this works