Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

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.