Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Nolgath
Creator
Creator

Concat is not working correctly and I dont have concatenate. Why?

My Script is: 

LOAD
Country,
Dealer,
"Cars Bought C2C",
"Cars Sold C2C",
"Cars Sold Retail",
"Avg Price",
"Avg Days to Sell",
"Cars Online",
concat(
'Abarth',
'Alfa Romeo',
'Alpina',
'Alpine',
'Aston Martin',
'Audi',
'Bentley'
) AS Car_Brands
FROM [lib://AttachedFiles/DealerProfiling.xlsx]
(ooxml, embedded labels, header is 1 lines, table is Sheet1);

 

Pretty simple stuff.. the problem is that inside the concat() this part is all red : 
,
'Alpine',
'Aston Martin',
'Audi',
'Bentley'
) AS Car_Brands
FROM [lib://AttachedFiles/DealerProfiling.xlsx]
(ooxml, embedded labels, header is 1 lines, table is Sheet1);

And I don't know why.. I tried concatenate but it seems like is not even available. 

My Qlik Version is : 13.95.3

Would & "field" & way work?

Labels (5)
4 Replies
Or
MVP
MVP

For string concatenation, use 'String1' & 'String2'. Concat() is an aggregation function to concatenate values across multiple rows of data.

Nolgath
Creator
Creator
Author

Hello, 

Thank you for the solution, I've tried the method but I've encontered the same issue, when I add the dimension to Filter Pan in front end it does not show the brands of the cars instead I get numbers, like 00200000000000 the 2 being that that car that is third in the concatenation has 2 cars. I just need each unique brand. Is it possible?

Nolgath
Creator
Creator
Author

Treid TO_STRING but did not work.

Trying text()

Or
MVP
MVP

Sorry, but I have no idea what it is you're showing me. It's certainly not the car manufacturers from your original post...

Note that concatenating does not make a listbox. 'String1' & 'String2' will result in one string of 'String1String2'. If you're looking to load a bunch of individual lines, have a look at using an inline load.