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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register 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)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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