Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.


Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How to match on two ranges

I know I can match up two tables based upon one range using interval match, however, I have been given a scenario where I need to map the data based on two ranges of data.  In this instance we are working with GL data so they want to group their accounts together by certain departments and accounts.  So I have table of two ranges (dept 1 - 10, accnt 100 - 150 = expenses, dept 20-30, acct 100 - 150 = variable expenses).  I need to run through all my departments and accounts and classify them based upon if the fall with in the two ranges.

Tags (3)
3 Replies
MVP & Luminary
MVP & Luminary

Re: How to match on two ranges

You could first match the departments with the department ranges and then match the accounts to their ranges using the department range as key field. See the extended syntax of intervalmatch in the help file.

talk is cheap, supply exceeds demand
Not applicable

Re: How to match on two ranges

Not sure I follow you, I looked ath the extended syntax and it only shows the ability to send in one match field and I need use two.  Below is what I copied off of help.

intervalmatch (matchfield,keyfield1 [ , keyfield2, ... keyfield5 ] ) (loadstatement | selectstatement )

I was hoping there was a way to do this

intervalmatch (matchfield,keyfield1 [ , keyfield2, ... keyfield5 ], matchfield, keyfield1 [ , keyfield2, ... keyfield5 ] ) (loadstatement | selectstatement )

New Contributor III

Re: How to match on two ranges

Hope this Helps

Re: IntervalMatch for two different ranges

Thanks & Regards