Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
cmillerclaritas
Contributor II
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

1 Solution

Accepted Solutions
tulabandula
Partner - Contributor III
Partner - Contributor III

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
tulabandula
Partner - Contributor III
Partner - Contributor III

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

=Destination Country & '- ' & Origin Country

zebhashmi
Specialist
Specialist

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

cmillerclaritas
Contributor II
Contributor II
Author

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
Contributor II
Contributor II
Author

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