Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calendar

Hi All

could you please explain the meaning of the below query  and how this can be used to generate Current Year vs Last Year,Current Month vs Previous Month , Current month in this year and current month in last year, YTD,MTD,QTD

date(DATE) as DATE, 

     YEAR(ADDMONTHS(DATE,-3)) AS YEAR,

  TEXT(MONTH(DATE)) AS MONTHLINK,

  Week(DATE) as WEEK,

  monthname(DATE)AS MONTHNAME,

  Day(DATE) as DAY

Thank you in Advance

Jayanthan

3 Replies
Not applicable
Author

For a good calendar I would use the following for Calendar:

The Fastest Dynamic Calendar Script (Ever)

and with regard to comparisons I would read the following:

QlikView App: Set Analysis - Prior Period Comparison

its_anandrjs
Champion III
Champion III

Hi,

Better way you try this

MasterCalendar:

Load

                TempDate,

                TempDate AS DateField,

                Week(TempDate) As Week,

                Year(TempDate) As Year,

                Month(TempDate) As Month,

                'Q'&Ceil(Month(TempDate)/3) as Qtr,

                Day(TempDate) As Day,

                YeartoDate(TempDate)*-1 as CurYTDFlag,

                YeartoDate(TempDate,-1)*-1 as LastYTDFlag

Resident TempCalendar

Order By TempDate ASC;   

Regards

Anand

richard_pearce6
Partner - Specialist
Partner - Specialist

Hi,

You could also try an as of calendar. Here's a working example http://community.qlik.com/docs/DOC-6593

Richard