Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
oxiofrt
Partner - Creator
Partner - Creator

Set analysis syntax for multi year

Hi,

I have created a chart (simplified in the example herejoined) which display a mesure for 5 years (the selected one and the 4 years before).

In this chart I would like to display the value of the year (it works...) and the value of the year before (and it doesn't works).

I am not sure it is possible...  Could you please help ?

Thanks a lot !

5 Replies
Anonymous
Not applicable

for years use expression in set analysis like

current year

sum( {$<EXERCICE = {$(#=max(EXERCICE))}>} Sales )

previous year

sum( {$<EXERCICE = {$(#=max(EXERCICE)-1)}>} Sales )

hope it helps

Sri1

maxgro
MVP
MVP

maybe

= Sum ( {$ <EXERCICE={">=$(=max(EXERCICE)-5)<=$(=max(EXERCICE)-0)"},ID_CHAPITRE= {"74"}, ID_SECTION={"F"}, ID_SENS={"R"} > } MT_TTC_MANDAT_TITRE)

sudeepkm
Specialist III
Specialist III

as per the comment mentioned in the text object, do you want to display the value of prev year in the next yr that means do you want to show the value of 2011 (56 805) in the year 2012. As per your data the chart is currently showing correct values. I did a simple selection and found it. Please confirm.

T118095.png

oxiofrt
Partner - Creator
Partner - Creator
Author

Thanks a lot for your answer !

I would like to have both value in the table  : N and N-1, just as in the table hereafter :

Qlik.png

oxiofrt
Partner - Creator
Partner - Creator
Author

Thanks a lot for your answer.

It may not work as I would like to have the value for each year, and not only for the year before the current year

(in the example herafter, with your formula, I retrieve only one value. I don't want to create 5 expression but only one)

Qlik2.png

The expected result :

Qlik.png

Thank you