Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Contributor II

Show only last year data in pivot table

Hi,

I have a date Field as - (Period) in format of 'MMM-YYYY' .  I need to only show last year data(2018).

How do i go with the script.

For Example - 

Name20192018201720162015
List-4   
Top 6   

 

Now i need to show only last year column, ie. 2018

Note: Period Field has auto calendar applied.

 

Thanks in advance.

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: Show only last year data in pivot table

Hi,

you could do it with set analysis, but if you want to do it with the script:

- you could create a new field year inside calendar like this if(year(period)=Year(Today())-1,Year(Period) 

- then use this field in the pivot

View solution in original post

2 Replies
Highlighted
Partner
Partner

Re: Show only last year data in pivot table

Hi,

you could do it with set analysis, but if you want to do it with the script:

- you could create a new field year inside calendar like this if(year(period)=Year(Today())-1,Year(Period) 

- then use this field in the pivot

View solution in original post

Highlighted
Contributor II

Re: Show only last year data in pivot table

Thanks a alot! It worked.