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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
nrwlafhus
Contributor II
Contributor II

Variable greater than or less than variable

I have a pivot table with a single expression. The requirement is to allow the user to filter the data in the pivot table based on two variables. 

Variable 1: will be less than or greater than ( > or <)

Variable2: some integer

I would like to be able to have the user select < or > and enter a value and have the pivot table only show lines that fall within the variable range. 

My current expression doesn't respond at all. =if(sum( Planned) - sum( Actual) & $(Variable1) & $(Variable2),
sum(Planned) - sum(Actual),null())

Any guidance would be appreciated.

Labels (1)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Try removing the & signs like this :

 =if(sum(Planned) - sum( Actual)  $(Variable1) $(Variable2),sum(Planned) - sum(Actual),null())

View solution in original post

2 Replies
Vegar
MVP
MVP

Try removing the & signs like this :

 =if(sum(Planned) - sum( Actual)  $(Variable1) $(Variable2),sum(Planned) - sum(Actual),null())

nrwlafhus
Contributor II
Contributor II
Author

That worked! Thanks. How come when I use that expression the syntax checker doesn't accept it but it still works?