Discussion Board for collaboration on QlikView Scripting.
I've got this problem. (example data in xls file)
There is data table with date, customers and their loans.
Then I've got table with CUSTOMER_TYPE:
And then I have two tables of Loans rates. One for Customer TYPE_RATE
and another for special customer rates
What I need (I think) is to use interval match to join CUSTOMER_TYP on DATA to know what was the type of customer in specific date. Then i need to join TYPE_RATE on CUSTOMER_TYPE and SPECIAL_RATE on DATA to know, what rate to use in specific date (special rate prefered, type_rate otherwise). Everything is considering Valid_from / Valid_to.
Let's say, that i solved the issue of missing valid_to by this:
But I have no idea, why using two interval matches doesnt work or what am I doing wrong. HOW TO INTERVALMATCH TYPER_RATE ON CUSTOMER_TYPE?
My incomplete solution is in attachment. Thx for any advice...
Check your data model (ctrl-T, Source Table View) and you will see that you have unwanted synthetic keys. Fix that.
Further, check IntervalMatch and Slowly Changing Dimensions where I have a double intervalmatch as an example.
Hi again Nagaraj,
I went it through and I had found a problem.
Because of inner join I loose all data where customers don't have special customer rate. This script construction doesn't allow me to replace it with different kind of join because it would double some rows.
Any idea how to change the script? Meantime I solved the issue by generating "date" for every day for every row between interval dates. But I don't think it's neat solution...