I could not completly understand the issue, can you pls share some sample data set and the requirement.
We could not understand what MasterActiveCalendar or TempActiveCalendar are, it would be easiler if you can share this app.
The issue may be bec of this last join where the key is not defined (assuming MasterActiveCalendar and MasterActive are same)
//left join (MasterActiveCalendar)
//[Service User ID],
//ActStartDate as ActiveStartDate,
//ActEndDate as ActiveEndDate
Ok I think this has really helped actually.
What I think is working is the following:
[Service User ID],
date(ActStartDate + Iterno()-1) As ActiveDate
While ActStartDate + IterNo() -1 <= ActEndDate
adapted from the link provided by swuehl above
What I found difficult is the idea that Qlik loops to bring back the records anyway. So I do not need to define a loop which sets out the individual Service User ID's for each group of records.
Hopefully this will now take a tables as follows:
Service User ID ActStartDate ActEndDate 1000562 01/07/2012 04/07/2012 1089456 01/08/2014 09/08/2014 200100 04/05/2015 03/06/2015
and create a second which has all the "missing" dates:
Service User ID ActiveDate 1000562 01/07/2012 1000562 02/07/2012 1000562 03/07/2012 1000562 04/07/2012 1089456 01/08/2014 1089456 02/08/2014
It would seem like it creates about the right number of records but the analysis of this is looking a bit funny.