Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
markramiro
Creator II
Creator II

Select in Field - inserting a function

Hi Experts,

I'd like to only select rows (via a button) that satisfy a function. I first have a variable (vTestVariable) in a slider object for the user to select anywhere from 0-100. Upon clicking the button, it should only select ID's where the function below is satisfied:

Value where Type=A minus Value where Type=B should be >= vTestVariable

The table of data I am working with resembles below:

IDValueType
ABC10060A
ABC10010B
DEF99990A
DEF99980B

So if vTestVariable = 30 and the button is pressed, only ID=ABC100 should in the selection because 60-10>=30. DEF999 should not be part of selection because 90-80 < 30. Any ideas how I can implement this? I was trying to use "Select in Field" Action but finding it tricky what field to put and what search string is.

Thanks!

1 Solution

Accepted Solutions
sunny_talwar

Try this as search string

='=Sum({<Type = {"A"}, ID>} Value) - Sum({<Type = {"B"}, ID>} Value) >= vTestVariable'

View solution in original post

1 Reply
sunny_talwar

Try this as search string

='=Sum({<Type = {"A"}, ID>} Value) - Sum({<Type = {"B"}, ID>} Value) >= vTestVariable'