Discussion Board for collaboration on QlikView Scripting.
Hope someone can help me on this one. I have table with income intervals, however there are different sets of intervals depending on the number of persons in the household. For example:
Persons in Household/IncomeStart/IncomeEnd/IntervalName
and so on...
I have another table that has persons in household and incomes:
Persons in Household/IncomeLevel
how do i script an intervalmatch that will match the IntervalName in the Key table to the IncomeLevel in the Population table, based on persons in household?
Look into the extended syntax of intervalmatch, where you can add a [Person in Household] as key to the interval match:
LOAD * INLINE [
] (delimiter is '/');
IntervalMatch (IncomeLevel,[Persons in Household]) LOAD IncomeStart, IncomeEnd, [Persons in Household] Resident Key;
I'm getting synthetic tables when I do this. I tried to work around that by joining:
left join (Population)
and then, because the IntervalName field does not carry over, I did another join after the previous:
drop table Key;
However, there seems to be some data inconsistencies when I do this. Some fields are missing IntervalNames when they are clearly marked in the Key table. Anyone know what's going on?
The created synthetic table is ok, but if you want to get rid of the synthetic key, I think you can do it like
join IntervalMatch (IncomeLevel,[Persons in Household]) LOAD IncomeStart, IncomeEnd, [Persons in Household] Resident Key;
Left join (Population) LOAD * resident Key;
Not sure why you are missing data when they should have a link to IntervalName. Could you upload some data that demonstrate this issue?