Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Below qualifier concatenate two values in an expression without creating any field in qlik.
=Destination Country & '- ' & Origin Country
Below qualifier concatenate two values in an expression without creating any field in qlik.
=Destination Country & '- ' & Origin Country
I would say look into (Aggr) and (firstsortedvalue) then just concatenate like Sreeni Saying
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
..Thanks very much! I will take a look at this later today!