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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to convert [2003.000000] in year

how to convert [2003.000000] in year 2003

14 Replies
Anonymous
Not applicable
Author

Is there a reason why you do not just alias ?

Not applicable
Author

Thanks Peter,

Its working.

Not applicable
Author

Hi,

I got the solution.was looking for other method. Thanks !

its_anandrjs
Champion III
Champion III

Hi,

If after cross table you get values like 2003.000000

tmp:

CrossTable(year, amount, 2)

LOAD Office,

     Department,

     [2003.000000],

     [2004.000000],

     [2005.000000],

     [2006.000000],

     [2007.000000]  

FROM [..\ct2.xlsx] (ooxml, ...);

Final:

NOCONCATENATE

LOAD Office, Department,

    NUM(year,'####') as Year1, //First Try

     Year(Date#(NUM(year,'####'),'YYYY')) as Year2, //Second Try

     amount

RESIDENT tmp;

DROP Table tmp;


OR provide sample file for this and let me know



Regards

Anand

MarcoWedel

t1:

CrossTable(yeartemp, amount, 2)

LOAD *

FROM

[..\ct2.xlsx];


Left Join (t1)

LOAD Distinct

          yeartemp,

           TextBetween(yeartemp, '[', '.') as year

Resident t1;



hope this helps


regards


Marco