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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
JM39
Creator
Creator

Find whether a value is between two numbers

Hello

I imagine this is quite simple but I'm struggling to find the answer. Essentially I'm trying to find a 'between' function. So I want to say:

If row1.MY_COLUMN is between 500000 and 610000 then use that value, else 'something else'..

Tia for any help!

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

row1.MYCOLUMN >=500000 && row1.MYCOLUMN <=610000 ? row1.MYCOLUMN : -1

 

This is an in-line IF. It says, "IF MYCOLUMN is greater than or equal to 500000 and MYCOLUMN is less than or equal to 610000, then use MYCOLUMN, else use -1".

View solution in original post

2 Replies
Anonymous
Not applicable

row1.MYCOLUMN >=500000 && row1.MYCOLUMN <=610000 ? row1.MYCOLUMN : -1

 

This is an in-line IF. It says, "IF MYCOLUMN is greater than or equal to 500000 and MYCOLUMN is less than or equal to 610000, then use MYCOLUMN, else use -1".

JM39
Creator
Creator
Author

Works perfectly, thank you! 🙂