Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
PFA the qlikview app. I want the dimension YearMonth as Jan-2017, Feb-2017 from 12017, 22017 and so on.
Thanks for your help!
Try with :
Load *,
if(len(YearMonth)=5, date(date#(YearMonth,'MYYYY'),'MMM-YYYY'), date(date#(YearMonth,'MMYYYY'),'MMM-YYYY')) as newfield
Resident Table;
Try:
=Date(Date#(YearMonth,'MYYYY'),'MMM-YYYY')
Try this,
Load field, date(date#(field,'MYYYY'),'MMM-YYYY') as newfield
From xyz
Regards,
Kaushik Solanki
Try this
Table:
LOAD * INLINE [
YearMonth
12017
22017
32017
42017
52017
62017
72017
82017
92017
102017
112017
122017
];
Load *,
Year(Date#(YearMonth,'[]YYYY')) as Year,
Date(Date#(YearMonth,'MYYYY'),'MMM-YYYY') as NewYearMonth
Resident Table;
I followed the same approach. The issue is highlighted below
For cases 112017 and 122017 im getting Jan-12017 and Jan -22017. How to resolve this?
Sorry, one 'M' was missed. Try:
Date(Date#(YearMonth,'MMYYYY'),'MMM-YYYY')
This working for those where Month is 2 digits. Not for rest of the cases.
Try this
Table:
LOAD * INLINE [
YearMonth
012017
022017
032017
042017
052017
062017
072017
082017
092017
102017
112017
122017
];
Load *,
Year(Date#(YearMonth,'[]YYYY')) as Year,
Date(Date#(YearMonth,'MMYYYY'),'MMM-YYYY') as NewYearMonth
Resident Table;
Try this Arpita.
Date(Date#(YearMonth,'MMMYYYY'),'MMM-YYYY') AS YearMonth