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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
sibrulotte
Creator III
Creator III

Subtracting from a variable (not in a set analysis)

Hi,

I have a rather simple expression:

 

=

sum(if([Année financière]= Annee_financiere

AND

[%CLE_Type_Transaction_ID] <>'EB'

AND

[%CLE_Type_Transaction_ID]<>'EA'

AND

[Période financière]<= 12 ,

Montant))

WORKS GREAT !

I'd like another expression to be Annee_financiere -1

So I tried:

=

sum(if([Année financière]= $(=Annee_financiere -1)

AND

[%CLE_Type_Transaction_ID] <>'EB'

AND

[%CLE_Type_Transaction_ID]<>'EA'

AND

[Période financière]<= 12 ,

Montant))

Returns zeros.

 

What am I missing. Do I really have to start aiming for a set analysis? If so what would it look like.

1 Solution

Accepted Solutions
qliksus
Specialist II
Specialist II

Hi,

If Annee_financiere is a variable stores number then use only Annee_financiere-1 instead of $(=Annee_financiere-1).

If it contains some calculation then try any of one from ( $(Annee_financiere)-1) / $(=Annee_financiere)-1

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Can you post an example document that explains your problem?


talk is cheap, supply exceeds demand
qliksus
Specialist II
Specialist II

Hi,

If Annee_financiere is a variable stores number then use only Annee_financiere-1 instead of $(=Annee_financiere-1).

If it contains some calculation then try any of one from ( $(Annee_financiere)-1) / $(=Annee_financiere)-1

sibrulotte
Creator III
Creator III
Author


$(=Anne_financiere)-1

That worked.