Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

Concatenate on several fields not work

Hi,

I have a question, i have two tables let's say table A and table B. Table A has 4 fields,

KEY          YEAR          WEEK          YWEEK

...     .          ....               ....               ....

Table B also has 4 fields like table A, i want to concate table A with table B. Field KEY and YWEEK from table B successfuly concate to table A, but FIeld YEAR and WEEK from table B not working. do you know the problem ? Really appreciate your help.

Thanks

UPDATE:

When i convert WEEK from table B using "NUM" function, the concate not working. But when i use WEEK as TEXT it's working. But i need to convert WEEK into number format.

Regards,

Indra

1 Solution

Accepted Solutions

Re: Concatenate on several fields not work

Hi ,

Try like this

Table_A:

LOAD *[Field

KEY        

YEAR       

WEEK

YWEEK

];


Concatenate

LOAD *[Field

KEY       

YEAR       

Num(Num#(WEEK)) as WEEK,

YWEEK

];

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
19 Replies
miranrai
New Contributor III

Re: Concatenate on several fields not work

Hi,

If two tables are having same columns in both table then it will auto concatenate both table. Qlikview is case sensitive check your column names.

Not applicable

Re: Concatenate on several fields not work

Hi Mira,

Column name is same. Field WEEK on table A has number format, in the other side field WEEK on table B has text format. So i change WEEK on table B into number format using NUM function, the result is not working. but when i'm not convert WEEK on table B into number format (still text format) it's work. Can you give me the solution ?

Thanks

prabhas277
Contributor

Re: Concatenate on several fields not work

hi

give some sample data then that will help to you..

vardhancse
Valued Contributor III

Re: Concatenate on several fields not work

Table_A:

LOAD *[Field

KEY         

YEAR        

WEEK

YWEEK

];


Concatenate

LOAD *[Field

KEY        

YEAR        

WEEK

YWEEK

];


Now automatically the Table A and Table B will be concatenated based on the 4 fields.

Not applicable

Re: Concatenate on several fields not work

Hi Sasi,

I have try your solution, but it's not the problem.

Field WEEK on table A has number format, in the other side field WEEK on table B has text format. So i change WEEK on table B into number format using NUM function, the result is not working. but when i'm not convert WEEK on table B into number format (still text format) it's work. Can you give me the solution ?

Thanks

Not applicable

Re: Concatenate on several fields not work

Hi Indra,

Try like this

Table_A:

LOAD *[Field

KEY        

YEAR       

WEEK

YWEEK

];


Concatenate

LOAD *[Field

KEY       

YEAR       

Num(WEEK) as WEEK,

YWEEK

];


Not applicable

Re: Concatenate on several fields not work

Hi Harsha.

Thanks for the solution, but i have try your solution and it's not working

Another field (KEY, YEAR, YWEEK) sucessfully concate but week is not working and give the result - (stripe symbol)

Do you know the problem ?

Thanks

Not applicable

Re: Concatenate on several fields not work

I think it is creating NULL values(stripe symbols) because of Num(WEEK) ...

let me know the values of WEEK field in Table B.....

Generally NUM(WEEK(Timestamp)) will give you the corresponding numeric value for the given week...

Not applicable

Re: Concatenate on several fields not work

Values of week in Tabel B ex: 01, 02, 03,.... 10, 11, 12, ...., 52

I think the problem in on converting text to number.