Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
cmillerclaritas
New Contributor II

Qlik Sense Concat Function

All,

I'm trying to figure out if and how the Qlik concat function works and I'm hoping someone can point me in the right direction.

I have two fields: Origin Country and Destination Country. I'd like to create a third country which combines the two separated by a hyphen, with the combination happening so that the lower country in terms of the alphabet is always first. Here is an example

Origin Country: Germany

Destination Country: Denmark

Concatenated Country: Denmark-Germany

I've reviewed the concat function in the help page and looked around for other examples but I cant quite figure this out. Is the function only available for use in the load script? I don't think so but I wanted to confirm. I'm not looking to create a new column, just an expression for use in one report.

Does anyone have any thoughts?

Thanks,

Chris

Tags (1)
1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: Qlik Sense Concat Function

Below qualifier concatenate two values in an expression without creating any field in qlik.

=Destination Country & '- ' & Origin Country

View solution in original post

4 Replies
Highlighted
Partner
Partner

Re: Qlik Sense Concat Function

Below qualifier concatenate two values in an expression without creating any field in qlik.

=Destination Country & '- ' & Origin Country

View solution in original post

zebhashmi
Valued Contributor

Re: Qlik Sense Concat Function

I would say look into (Aggr) and (firstsortedvalue) then just concatenate like Sreeni Saying

cmillerclaritas
New Contributor II

Re: Qlik Sense Concat Function

All, thanks very much for the quick response on this. Here is what I came up with thanks to your help:

=if([Destination Country]>[Origin Country],[Origin Country] & '-' & [Destination Country],[Destination Country]& '-' & [Origin Country])

This essentially replicates what I do in excel

Works perfectly and much appreciated!...

I will look at the aggr/firstsorted value solution later today

cmillerclaritas
New Contributor II

Re: Qlik Sense Concat Function

..Thanks very much! I will take a look at this later today!