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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to display the data from a table column concatenated in a string

Hi All,

I am new to QlikView and I need to find out how to display the data from a table column concatenated in a string.

I am loading the data from 2 text files and my data model looks like this:

model.png

I am interested in the RSSFEEDCategory table. The data inside looks like this:

Now take for example the 3 last rows of this table. When I create a Pivot table it displays the data like this:

But I need it to be displayed like this:

Titlecategory
Bike Q&A@breaking-news, @hp-top-stories, mount scott, mount tabor, ocyclers, oregonian cycling, rocky butte

Is it possible to do this in QlikView? I was thinking to put a function in the load similar to a cursor in SQL but I do not know if it is possible. The other options I can think about are an expression or maybe a macro.

Can any of you point me in the right direction?

Thank you.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You can use a table chart with dimension Title and an expression

=concat(category, ', ' )

This will create a concatenated string of your category values, but sorted alphabetically.

If you want it to be displayed in a special order, you can use the third parameter to concat, the sort weight.

For example, if you wan the load order, you can create an additional field in the script

RSSFeedCategory:

LOAD

     key,

     category,

     recno() as categorySortWeight

FROM ...

then use this field:

=concat(category, ', ', categorySortWeight)

View solution in original post

2 Replies
swuehl
MVP
MVP

You can use a table chart with dimension Title and an expression

=concat(category, ', ' )

This will create a concatenated string of your category values, but sorted alphabetically.

If you want it to be displayed in a special order, you can use the third parameter to concat, the sort weight.

For example, if you wan the load order, you can create an additional field in the script

RSSFeedCategory:

LOAD

     key,

     category,

     recno() as categorySortWeight

FROM ...

then use this field:

=concat(category, ', ', categorySortWeight)

Not applicable
Author

Thank you swuehl. That solved my problem.