Hi,
I need a suggestion on how to handle a problem with Qlik data structure.
I have a table "A" on wich I have two colums like "user_id", "date" (datetime)
Another table "B" need to get foreach "user_id" all the colums "date" that match the same "user_id"
Table "B" has some colums like "user_id", "name", "amount", "purchase_date".
The relation between "B" and "A" is one to many, so I have "n" records in table "A" foreach record of "B".
The need is to check which record of "B" has the "purchase_date" greater than "date" (in table "A").
But if I simply use an ApplyMap to get in the table "B" the "date" column (using "user_id" as the key) I can get just the first record of the ApplyMap that matches, an that record can be not the one I need.
So I want to get in table "B" all the possible records of table "A" that matches, and any "user_id" can have an arbitrary number of records that matches (0...n).
How can I design a schema that allow me to define a simple check on the frontend (I suppose with Set Analysis) to check if a particular record of the table "B" has "purchase_date" greater than any occurence of "date" of the table "A" ?
Thanks in advance!