Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
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

Tags (1)
5 Replies
Highlighted

Re: Wanted to get previous year data by clicking one button

Hi,

May be like this.

Regards

ASHFAQ

Highlighted
Not applicable

Re: Wanted to get previous year data by clicking one button

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

Highlighted

Re: Re: Wanted to get previous year data by clicking one button

Hi

Create a button.

and add trigger Select in field

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

=year(today())-1

Please find the snapshot attached.

Hope it helped.

Regards

ASHFAQ

Highlighted
Not applicable

Re: Wanted to get previous year data by clicking one button

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

Highlighted
Not applicable

Re: Wanted to get previous year data by clicking one button

Hi

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.