Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a date field, 'YR_MTH_KEY' in my source table which is in below format:
201601
201602
201603
201604
201605
201606
201607
201608
201609
But in my chart I want to show it in a more meaningful way like 'MMM-YY' or something like that:
But I'm not able to change my format.
I gave the exp as Date(MonthStart(Date#(YR_MTH_KEY, 'YYYYMM'))), I got some junk value. Any idea how I should give my expression for the date field.
Date((Date#(YR_MTH_KEY, 'YYYYMM')))
Or
(Date#(YR_MTH_KEY, 'YYYYMM')
Strange it did not work, but you did not provide MMM-YY to it? Not sure this will work, but try this:
Date(MonthStart(Date#(YR_MTH_KEY, 'YYYYMM')), 'MMM-YY')
Its returning junk values like:
Mar-91
Apr-94,
Apr-97,
May-00
Jun-03
Jan-40
Its returning junk values like:
Mar-91
Apr-94,
Apr-97,
May-00
Jun-03
Jan-40
are those values format are in text or numbers, if in Numbers the above equations would work.
May be trythis?
LOAD Date(MakeDate(Left(YRMonthKey,4), Right(YRMonthKey,2)), 'YYYYMM') AS YrMonthKey;
LOAD * INLINE [
YRMonthKey
201601
201602
201603
201604
201605
201606
201607
201608
201609
];
Will you be able to share your application, I am amazed its doing this