How to get all continuous months between two dates – Qlik Community


Hello! 

I am working on loading a data set looking at patient eligibility for a certain insurance. For this data set, I have a patient ID, start date of eligibility, and stop date of eligibility. See example of data below:

Screenshot 2024-05-23 112935.png

I would like to create a “Yes/No” field in the load script for each patient ID on whether or not they are eligible for the insurance for each month. For example, all the months between 3/1/2022 and 12/31/2022 would say “Yes” for eligibility for patient ID 4, but all the months between 12/31/2022 and 4/1/2023 would say “No” for eligibility for patient ID 4. We thought about using a “For Each” loop, but it seems inefficient given the size of our data set. What would be the best way to achieve this result?



Source link

Leave a Comment