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: 
Not applicable

hi. i want dynamically change year wise sales

chart how to shows wiil be privieous year and cureent selection year wise sales, when am i select year listbox



ex : year=2012

the chart shows 2011,2012 year wis sales

load * Inline [

year,sales

2011,1254

2012,1225

2013,12545

2014,00222

];

4 Replies
MayilVahanan

hi

Try like this

Year as Dimension

exp: =Sum({<year ={">=$(=Max(year)-1)<=$(=Max(year))"}>}sales)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jyothish8807
Master II
Master II

Hi Ram,

Create two expression in a bar chart.

1. Sum({<Year={'$(=GetCurrentSelections(Year))'}>}Sales)

2.Sum({<Year={'$(=GetCurrentSelections(Year)-1)'}>}Sales)

Regards

KC

Best Regards,
KC
Not applicable
Author

Hi,

=sum({<year={'>$(=max(year_selected)-(1))  <=$(=max(year_selected)-(current_year))'}>}sales)

buzzy996
Master II
Master II

try with these exp..,

CY

=num(sum({$<Year = {$(=only(Year))}, Month = {"<=$(=max(Month))"}>} LineSalesAmount), '$#,##0;($#,##0)')

PY

=num(sum({$<Year = {$(=only(Year) - 1)}, Month = {"<=$(=max(Month))"}>} LineSalesAmount), '$#,##0;($#,##0)')