Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
QFanatic
Creator
Creator

Some coding / modelling assistance please

Hi clever people.

I have the following scenario:

1) A table with customers with the date they visited our store:

Customer Number Store Visit Date 
123 2022/01/20 09:06:49
123 2022/01/20 09:06:55
456 2022/01/20 14:01:22

 

2) A Table (for same customers),  containing a Timestamp when this customer bought one of our products (at this time, we dont know per which visit...we only have the TIME a product was bought)

Customer Number Product_bought_date Product Bought
123 2022/01/20 09:10:49 Apples
123 2022/01/20 09:12:55 Bananas
456 2022/01/20 15:03:22 Meat

 

Horrendous data - I know.

What I've been asked to do - The customer visits the store, and I need to know if he bought any products from us, within 1 hour of his visit.....(add 1 hour to the Store Visit date , and then see if the Product_bought_date is within that 1 hour bracket).

I dont want to join these two tables, as it will mess with the rest of my model, hence I was considering using applymap somehow - but I dont know how to put together this entire thing.

 

Much appreciated

 

Labels (1)
11 Replies
QFanatic
Creator
Creator
Author

Thank you so much - I will test it. Thanks for your trouble!

QFanatic
Creator
Creator
Author

Thanks for your assistance!