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

Map a date (MMM-YY) to an index number

HI All,

I would like to map the date to an index. I have tried using load * inline but it was not successful and blank appeared in the index column.

LOAD * INLINE [
Date, index
Apr-14, 1
May-14, 1
Jun-14, 1
Jul-14, 1
Aug-14, 2
Sep-14, 2
10-14, 3
Nov-14, 3
Dec-14, 3
Jan-15, 4
Feb-15, 4
Mar-15, 4
Apr-15, 5
May-15, 5
]
;

this is the end result table.

   

Date Index
Apr-141
May-141
Jun-141
Jul-141
Aug-142
Sep-142
Oct-143
Nov-143
Dec-143
Jan-154
Feb-154
Mar-154
Apr-155
May-155
13 Replies
MarcoWedel

you could also avoid your inline table like this:

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='$#,##0.00;($#,##0.00)';

SET TimeFormat='h:mm:ss TT';

SET DateFormat='DD-MM-YY';

SET TimestampFormat='DD-MM-YY h:mm:ss[.fff] TT';

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';

SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';

SET FirstWeekDay=6;

SET BrokenWeeks=1;

SET ReferenceDay=0;

SET FirstMonthOfYear=1;

SET CollationLocale='en-US';

table2:

LOAD [S/N],

    Customer,

    ScreeningDate,

    Date(MonthStart(ScreeningDate), 'MMM-YY') as ScreeningMonth,

    'Q'&Ceil(Mod(Month(ScreeningDate)+9,12)/3) as ScreeningQtr

FROM [https://community.qlik.com/servlet/JiveServlet/download/1005950-218396/Customer_date.xlsx] (ooxml, embedded labels, table is Sheet1)

Where [S/N];

hope this helps

regards

Marco

Not applicable
Author

Hi

Can I also know For question 2 finding the quarter difference in the same or duplicate customers?

MarcoWedel

Please close your thread by marking a correct answer if your initial question is answered and open another thread for independent questions.

Thanks

Regards

Marco

Not applicable
Author

It works.

Question 2 is related to this question 1.

will you all be able to advise?