Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
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

Re: prior year

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

10 Replies
sunny_talwar
Not applicable

Re: prior year

Try this

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

Not applicable

Re: prior year

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

sunny_talwar
Not applicable

Re: prior year

Can you show a screenshot of the field annee?

Not applicable

Re: prior year

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
Not applicable

Re: prior year

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

Not applicable

Re: prior year

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

Re: prior year

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
Not applicable

Re: prior year

How about this, doesn't work?

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

OmarBenSalem
Not applicable

Re: prior year

Try this:

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