Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
QSMACHBI
Contributor III
Contributor III

Issue with variable in set expression - Qlik sense

Hi ,

I need your help guys,

I have a variable named : vIsPreviousPeriode

When I use this variable in a set expression to feed a column in a table objet, I don't get the good result ! (all the time 0 value !!!)


1. First I calculate the vIsPreviousPeriode

2. I use this syntax : =SUM({$<Myfield = {$(=vIsPreviousPeriode)}>} Mymeasure)

15 Replies
QSMACHBI
Contributor III
Contributor III
Author

I tried this syntax (=Sum({$<Myfield = {"$(=vIsPreviousPeriode)"}>} Mymeasure)) , before posting my issue !

It doesn't work ! 

QSMACHBI
Contributor III
Contributor III
Author

Column1_withVariable  --- Column2_Without variable.png

silvacarlos
Creator II
Creator II

I don't know if you can set a variable with other 2 variables inside, I'll search information about that

sunny_talwar

How about this?

=Sum({$<Myfield = {"$(=$(vIsPreviousPeriode))"}>} Mymeasure)

QSMACHBI
Contributor III
Contributor III
Author

It works fine with the last syntax.

Thank you very  much

sunny_talwar

Awesome!!! Please close the thread by marking correct and helpful responses.Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny