Discussion Board for collaboration related to QlikView App Development.
I have one qvd which stores the following data:
What I want is: if the dates are within the same month and the same year, I want to apply the ID from the first day of the month to other date:
The result should be
How can I achieve it? Thanks.
Hi Isaac, for getting the id from the first date of each Month and Year loaded you can use:
LOAD If(Peek(Month)=Month and Peek(Year)=Year, Peek(Id), Id) as Id,
LOAD Id, Date(Date) as Date, Month(Date) as Month, Year(Date) as Year;
LOAD * Inline [
NoConcatenate LOAD Id, Date Resident Dates_tmp;
DROP Table Dates_tmp;
this should work:
data:load * inline [Id,Date1,2013-1-12,2013-1-23,2013-1-34,2014-3-15,2014-3-1];
Result:LOAD Id, Date, if(month(Date)=month(Previous(Date)), peek('ID'),Id) as IDResident dataORDER BY Date;