Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

concat function

Hi,

I have a question concerning a concat function. Let me give you an example.

There are three brands selected:

KIA

KIA CEE'D

KIA CERATO

I created a variable:

eDynamicTop=Concat({$} Distinct chr(39)Brands&chr(39), ',')


The result of this variable = 'KIA','KIA CEE'D','KIA CERATO'


Then I use this variable as an argument in the other expression.

match (only(Brands), $(eDynamicTop))


It doesn't work!

If I use chr(34), it doesn't work as well.


Is there a solution?

Thank you in advacne,


Larisa

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

It is certainly because of the single quote in the name.  The most reliable way is to get rid of this character on data load.  Otherwise, replace it with some unlikely string in the expressions, e.g.:

DynamicTop=Concat({$} Distinct chr(39)&replace(Brands,chr(39), 'AAA')&chr(39), ',')

=match (replace(Brands, chr(39), 'AAA'), $(eDynamicTop))

View solution in original post

4 Replies
sunny_talwar

What happens when you just select KIA and KIA CERATO? Does it then work? I am thinking that may be because you have single quote in KIA CEE'D, it might be interfering with your expression.

Can you share a sample?

Best,

Sunny

Anonymous
Not applicable
Author

It is certainly because of the single quote in the name.  The most reliable way is to get rid of this character on data load.  Otherwise, replace it with some unlikely string in the expressions, e.g.:

DynamicTop=Concat({$} Distinct chr(39)&replace(Brands,chr(39), 'AAA')&chr(39), ',')

=match (replace(Brands, chr(39), 'AAA'), $(eDynamicTop))

Anonymous
Not applicable
Author

Thank you!

If KIA chooses to give the name 'KIA CEE'D', I shall not change it because of QlikView pecularities

Anonymous
Not applicable
Author

I'd call it KIA peculiarities, but it's a subject open for discussion

(Full disclosure - I own a KIA myself, and have nothing against it, except the GPS software quality )