Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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
MVP
MVP

Try this

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

Not applicable
Author

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

sunny_talwar
MVP
MVP

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
MVP
MVP

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
MVP
MVP

How about this, doesn't work?

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

OmarBenSalem
Partner - Champion II
Partner - Champion II

Try this:

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