Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikJeremy
Contributor
Contributor

Showing previous year N-1 values on current year N in a pivot table

Hello, I'm trying to show up a set analysis based on the previous year on the current year selection.

I can't help but have the set analysis selecting values from the previous year showing on a different column, as shown in my capture. And for the 2023 column values show the 2022 values etc.

Here are the set analysis used , all the values are correctly selected but not showing in the pivot table as I'd like :

For the current year : 

Sum({<Code_Selection = {'350'}, IncidentYear = {$(=Max(year([IncidentYear])))}>} Amount)

For the previous year :

Sum({<Code_Selection = {'350'}, IncidentYear = {$(=Max(year([IncidentYear]))-1)}>} Amount)

 

Thank you for you help.

QlikJeremy_0-1726480908124.png

 

Labels (4)
4 Replies
Kushal_Chawda

@QlikJeremy  In pivot table you just want to show current year with two indicators with both current and previoys year value?

QlikJeremy
Contributor
Contributor
Author

Hello, I'd like to have my indicators based on the value of a year n-1 to show up on the year n.

Its the case for the current year but also for the previous ones.

For example if the column year in my table is n-3 I'd like my indicator to show the values of n-4 etc.

Kushal_Chawda

@QlikJeremy  Not sure I understand it. Could you create sample data in excel with expected output?

QlikJeremy
Contributor
Contributor
Author

Here is a picture of the output i've got and in the Excel picture the output I'd like

QlikJeremy_2-1726498502973.png

 

QlikJeremy_1-1726498341370.png