Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Wanted to get previous year data by clicking one button

Can ayone please tell me how to achive below one:

I wanted to create a button with the name "Previous Year", when you click on that button the entire dashboard should shows only previous year data.

Please help, Thanks in Advance

5 Replies


May be like this.



Not applicable

Thanks Ashfaq for the reply

Can you please send me the process in reply only if possible, since i am using desktap version of QV, i can not open this file



Create a button.

and add trigger Select in field

and Select field Year assuming you have year and write the below expression.


Please find the snapshot attached.

Hope it helped.



Not applicable

It did not help, sorry

Actualy i created two chart having three years of the data, my requirement is

if you are showing 2014 data in one chart, by clicking previous year button the second chart should show previous year data.

Thank you so much Ashfaq

Not applicable


Try to use set analysis

In the first diagrams display the current year. expression should be something like:

sum ({DimensionYear = {$ (=Year(Today()))}} Value)

The second diagram shows the previous year. Expression:

sum ({DimensionYear = {$ (=Year (Today()) -1)}} Value)

DimensionYear - the name of the field that contains year in the data model

It will work without buttons. Use Previous year button you can show/hide the second diagram.