Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I have in date in Excel like
STARTDATE ENDDATE
27/03/2016 31/05/2016
I need output like
Hi Mahesh,
My code is not adapted to your data structure. It was so you could see how you can iterate to get the dates you want between two dates. Anyway, here you have adapted.
You will have repeated the 999 in all dates between 27/03/2016 and 31/05/2016. On field YourDate you have the date on format 2016_May.
AAA:
LOAD
999 as Value,
Date(STARTDATE) as STARTDATE,
Date(ENDDATE) as ENDDATE;
LOAD * INLINE [
STARTDATE, ENDDATE
27/03/2016, 31/05/2016
];
Calendariced:
Load *,
Month(Date) as Month,
Date(MonthStart(Date),'YYYY_MMM') as YourDate,
Year(Date) as Year,
MonthName(Date) as MonthYear;
LOAD
Value,
STARTDATE + Iterno()-1 As Num,
Date(STARTDATE + IterNo() - 1) as Date
RESIDENT AAA
While STARTDATE + IterNo() -1 <= ENDDATE;
Regards!!!
Hi Experts,
I done like this
DATE(Date#(STARTDATE,'DD/MM/YYYY'),'YYYY_MMM') as STARTDATE,
DATE(Date#(ENDDATE,'DD/MM/YYYY'),'YYYY_MMM') AS ENDDATE,
I got like this
STARTDATE ENDDATE
2016_Mar 2016_May
Here I don't have April data I want April month also below like this.
But I need output :-
Date:-
2016_Mar,
2016_Apr,
2016_May
Note:- If i Add June month also i need Mar,Apr,May,June
Regards,
Mahesh
I tried many ways But i am not getting output.
I have shared My input and Qvw also.
Hi Mahesh,
Have you seen my last response?
This is the output:
Regards!!
See attached.
Regards!
Hi Manuel Capella,
In My system i am not getting output .why i don't no?
Regards,
Mahesh
Hi mahesh,
See my last attached example with your app.
Regards!
Hi,
T1:
LOAD
date(start_date,'YYYY_MMM') as start_date,
date(End_date,'YYYY_MMM') as End_date,
company_name
FROM
[........xlsx]
(ooxml, embedded labels, table is Sheet1);
LOAD Addmonths(start_date,iterno()-1) as start_date,
company_name
Resident T1
WHILE AddMonths(start_date,iterno()-1) <= End_date;
DROP Table T1;
Try this -
Hi Manuel Capella,
Thanks for your Support.
I got the output .
Regards,
Mahesh.
Hi Experts,
I got the output Thanks for your Support.
Regards,
Mahesh