Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calendar object FROM date TO date

Hi everyone,

I need to create a calendar object that has the possibility to choose start date and end date.

For example i would like to select, in a easy way, start date at jan. 21 2009 and finish date at april 13, 2012. How can I do that?

Thank you


Giorgia

7 Replies
v_iyyappan
Specialist
Specialist

Hi,

     I attached sample Qv file. Hope its help for u.

Regards,

Iyyappan

Anonymous
Not applicable
Author

Thank you very much but it isn't a calendar object.

I would like to have something like this

http://community.qlik.com/qlikviews/1075

but without set analysis in charts... It's possible?

Thank you

Giorgia

chematos
Specialist II
Specialist II

Hi gjamila,

You could use this code in the Script to generate dates from start to end. You could use variables or fix values and like you can see, the filed TempFecha has dates for everyday from start to end so you could make transformations on this field and load it in a table.

FOR vYear =  $(vYearStart) TO $(vYearEnd)

    LET DiaInicio  = makedate(vYear);        //Returns the first day of the year

    LET AñoFin    = yearend(DiaInicio);   

   

    //Days Quantity

    LET TotalDays = (AñoFin - DiaInicio) + 2;

   

    TempCalendar:

    LOAD

        date('$(DiaInicio)' + recno() - 1) AS TempFecha

    AUTOGENERATE(TotalDays - 1);

NEXT

I hope this help you.

Regards,

Chema.

v_iyyappan
Specialist
Specialist

Hi,

     I am using Calender object using date between ' 2009/01/21' to '2012/04/12'.

see the attached file

Iyyappan

Anonymous
Not applicable
Author

Thank you lyyappan, but i need something like this, with 2 calendar objects (from date To date):

Calendar.JPG

in this case i have to use set analysis in charts, as you seen above.

I need 2 calendar objects without using set analysis in charts. Is it possible?

Thank you

gjamila

Not applicable
Author

Dear gjamila,

This is the sample,you want ?

chematos
Specialist II
Specialist II

Try this:

=sum({<VEN_DATA_DOC={">=Date($(vStartDate))"}+{"=Date($(vEndDate))"}>}Aceptado)

Hope this helps