Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating a column "Year" on the Script, and adding those register to other Years.

Hi, i have this problem:

I have two excel documents: the first one I have a history, from 2005-2012, with company names that other company supports. I have one other, with only 2013 company names, that this other company support. So, it's like this the first Excel document (2005-2012):

Year          Company Name

2005               A

2005               B

2005               C

2006               A

2006               B

2006               C

    

The second document i don't have the column Year. I have only the company names. I need to create a column, on Qlikview, that will show '2013' in the year, followed by the Names. The final, i would like to appear like this:

Year            Company Name

2005               A

2005               B

2005               C

2006               A

2006               B

2006               C

  ...                 ...

2013               A

2013               B

2013               C

I've been trying to use the comand "year()", but it returns to me weird Dates (for example: year(2013) returns "1905"). Some other attempts, didn't work well, due to the fact that i need to create the field "year 2013" and put it together with the names and add it to the Year.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Something like this:

MyTable:

load Year, [Company Name]

from ...myexcelfile...;

load 2013 as Year, [Company Name]

from ...myotherfile...;


talk is cheap, supply exceeds demand

View solution in original post

1 Reply
Gysbert_Wassenaar

Something like this:

MyTable:

load Year, [Company Name]

from ...myexcelfile...;

load 2013 as Year, [Company Name]

from ...myotherfile...;


talk is cheap, supply exceeds demand