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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
bettina13
Contributor III
Contributor III

Set Analysis with variables does not work

Hello,

let varA and varB be variables and let fieldX, fieldY, fieldZ be  fields. Let c be a constant.

The following expressions work:

Sum ($ { < fieldX = {$(varA)} > } fieldY) and

Sum ($ { < fieldX = {"<= c"} > } fieldY).

The following expressions do not work:

Sum ($ { < fieldX = {"<=$(varA)"} > } fieldY) and

Sum ($ { < fieldX = {$(varA)} or fieldZ = {$(varB)}> } fieldY).

Has anyone an idea how to work with two variables in the Expression between < and > or how to work with "<="?

Thanks for your answer.

Bettina

Labels (1)
2 Replies
Kushal_Chawda
MVP
MVP

what is the value in varA, if it is number, below expression should work

Sum ($ { < fieldX = {"<=$(varA)"} > } fieldY)


try this


Sum ($ { < fieldX = {"$(varA)"} ,fieldZ = {"$(varB)"}> } fieldY).


bettina13
Contributor III
Contributor III
Author

Hi,

thanks for your answer.

The type of varA is date. I tried the same formula with Num (VarA) and had no success.

I also tried an Expression separated by commata without success.

Has anybody another idea?