Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

wanyunyang
Contributor

concatenate two fields in layout

I have OrderId in Order table, ReturnId in Return table. I'm trying to create a table in layout with one column: Id, which has both OrderId and ReturnId. Is that possible? I don't want to change the model by concatenating two tables.

Thanks in advance!

5 Replies
bwisealiahmad
Valued Contributor

Re: concatenate two fields in layout

Hi,

If I'm understanding you right you could do it with ampersand:

=Field1&' - '&Field2

So for you that would be

=OrderId&' - '&ReturnId

As your dimension.

Best,

Ali A

balabhaskarqlik
Honored Contributor

Re: concatenate two fields in layout

EX:

Tab1:

Load

Country,

Region,

Sales,

Products

From ABC;

Tab2:

Load

Country,

Region,

Customer,

Outstanding

From BCD;

On Above tables you can create key like:

Tab1:

Country&'-'&Region as Key    //Composite key

Sales

Products

From ABC;

Tab2:

Country&'-'&Region as Key   //Composite key

Customer,

Outstanding

From BCD;

If without concatenating tables, then you need to tweak script.

wanyunyang
Contributor

Re: concatenate two fields in layout

Hi Bala, thanks for helping, but I don't have much flexibility to tweak script, since it's a huge model. Is there a way to do this just in function expression?

bwisealiahmad
Valued Contributor

Re: concatenate two fields in layout

Read my answer above and try that

wanyunyang
Contributor

Re: concatenate two fields in layout

Hi Ali, just gave it a go, it's not working. OrderId and ReturnId become one string, which is not what I want.

Community Browser