Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

prior year

Hello everyone,

I hope that you can help me. Indeed, I want display two value side by side in a bar chart, first value for the year select and second value for the prior year. I use this formula in set analysis annee={$(=(annee-10))} (10 because it's ten by ten).

But nothing display in my bar chart.

Do you have any idea to help me ?

Best regards,

SD

1 Solution

Accepted Solutions
Not applicable
Author

Thanks, but my formula work finally, I need to add ">" before "}".

View solution in original post

10 Replies
sunny_talwar

Try this

annee={$(=Max(annee)-10)}

Not applicable
Author

Values display are still values of year select only...

sunny_talwar

Can you show a screenshot of the field annee?

Not applicable
Author

Yes, you can see with this picture :

annee.PNG

Before annee was a String but I modifiy in integer in the database and I refresh data.

sunny_talwar

Are you making selection in other Date and Time related fields?

Not applicable
Author

I use your expression without and with selection on annee field. Because, I want when I will select value 1981, I want value for 1971 and 1981 side by side.

Not applicable
Author

I try to create a variable like this anneeV : $(=annee+10). Then I use this variable in a set analysis like this : sum(${<nom_Mesure={exp}, annee={$(=anneeV)}, nom_Du_Pays-={'Monde'}} valeur).

But value display are this of current year select...

sunny_talwar

How about this, doesn't work?

Sum(${<nom_Mesure={exp}, annee={$(=Max(annee) - 10)}, nom_Du_Pays-={'Monde'}} valeur)

OmarBenSalem

Try this:

Sum({<annee=,annee={"$(=max(annee))","$(=max(annee)-5)"}>}YourMeasure)