Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to load only missing dates

HI,

I have a table called logins with cust_id and date, may be several rows with the same cust_id and date (several logins in the same day)

in the script - i`m trying to create a table that holds for each cust_id the dates he did not login from his first login until today.

 400K +/- customers and  looking on a 3 years period so i cant use cartesian product and then filter out the non relevnt.

how can i do this?

1 Reply
marcus_sommer

Why not a cartesian product? On the first glance it looked quite feasible: 400K * 3 years * 365 days are approximately 140M of records but it are just two fields and therefore it should go rather fast and not need too much of resources ... and in a following step a flag-value with a mapping could be following.

 

Beside this do you are really sure that you will need all these records (all the existing and the missing ones mean that you have ALL records)? Of course there are alternatives with loops but I don't think they will be easier and the result will be also to have all records (probably in one table because a split into several tables doesn't seemed to be beneficial).

 

- Marcus