Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikview979
Specialist
Specialist

Month

Hi Experts,

I have in  date in Excel like

STARTDATE  ENDDATE

27/03/2016      31/05/2016

I need output like

39 Replies
Anonymous
Not applicable

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!!!

qlikview979
Specialist
Specialist
Author

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.

Anonymous
Not applicable

Hi Mahesh,

Have you seen my last response?

This is the output:

Regards!!

Anonymous
Not applicable

See attached.

Regards!

qlikview979
Specialist
Specialist
Author

Hi Manuel Capella,

In My system i am not getting  output .why i don't no?

Regards,

Mahesh

Anonymous
Not applicable

Hi mahesh,

See my last attached example with your app.

Regards!

maniram23
Creator II
Creator II

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;

Digvijay_Singh

Try this -

Capture.JPG

qlikview979
Specialist
Specialist
Author

Hi Manuel Capella,

Thanks for your Support.

I got the output .

Regards,

Mahesh.

qlikview979
Specialist
Specialist
Author

Hi Experts,

I got the output Thanks for your Support.

Regards,

Mahesh