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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Select a range of data from a field

Hi Experts,

Simply question for you all 🙂

I am trying to make a"from-till"selection on a database field.
For example: I want all product with [ProductID] from 20000 until 30000.

What I did sofar:

I made 2 variable: vProductID_first and vProductID_Max and made 2 inputboxes to fill in the numbers.
But how do i get vProductID_first to be the first of the range and vProductID_Max to be the last [ProductID].
I have been trying to make a button with a macro function to this but I don't seem to find the right macro code


Or is there an other way maybe?


12 Replies
Anonymous
Not applicable
Author

Thanks Rob,

But how do I make a selection in a field where the value is in between 2 variable by using the "select in field"-action?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Use a search expression in the Search String field. There are a couple of syntaxes that work:

='>=$(vStartDate) <=$(vEndDate)'

='>=' & vStartDate & '<=' & vEndDate

If you need quotes around the variable values use:

='>=' & chr(39) & vStartDate & chr(39) & '<=' & chr(39) & vEndDate & chr(39)

-Rob

gaurav2017
Creator II
Creator II

Hi,

Please look at the attachment, the selection for numerical values in a range is working but the text values are not getting selected. please help in correcting the code.