Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
Do you know you can get rid of that synthetic key, which is generated when you use IntervalMatch?
Here is an example of how.
Hope it helps someone.
--------------------------
Category:
LOAD * INLINE [
Desc, from-day, to-day
First, 1, 10
Second, 11, 20
Third, 21, 31
];
Emp:
LOAD * INLINE [
Name, day
A1, 1
A1, 5
A1, 2
A2, 7
A2, 15
A3, 25
];
Left join(Emp)
Intervalmatch(day)
LOAD [from-day], [to-day]
RESIDENT Category;
Left join (Emp)
LOAD * resident Category;
drop table Category;
THX a lot,
this example fits exactly my requirements!
It saved me a lot of time!
Martin
Also helped me loads. Was stuck for days lol Thanks man
Hello Rakesh,
Thanks for the share, Superlike*
Angad
Just be careful... This solution works fine as long as a day belongs to only one range. If you have a situation where one day can belong to several ranges (either intentionally or by mistake) then this solution will cause QlikView to calculate the numbers incorrectly. The solution with the synthetic key always calculates correctly.
Synthetic keys should not always be removed - they are in fact quite good if used correctly. I would not remove this synthetic key. Read more about them here: Synthetic keys.
HIC
PS: My view on IntervalMatch.