Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Concatenate Rows

Hi every one we have a typical requirement We have following data

User IDNameDevice
80004022ABDUL AZAM868438010471186
80004022ABDUL AZAM868438010471186A
80001571ABDUL AZIZ868438010470071
80001571ABDUL AZIZ868438010470071A
80001571ABDUL AZIZ868438010470071B
80001594AKHLAQ AHMED868438010470147
80001594AKHLAQ AHMED868438010470147A
80001594AKHLAQ AHMED868438010470147B
80001594AKHLAQ AHMED868438010470147C
80001591ASIM IQBAL868438010471145
80001591ASIM IQBAL868438010471145A
80001591ASIM IQBAL868438010471145B
80001591ASIM IQBAL868438010471145C
80001705IMRAN UL HASSAN868438010464702
80001705IMRAN UL HASSAN868438010464702A
80001705IMRAN UL HASSAN868438010464702B
80006221MUHAMMAD AHMED KHAN868438010467937
80006221MUHAMMAD AHMED KHAN868438010467937A
80001703RAJA TALLET IMTIAZ868438010463480
80001703RAJA TALLET IMTIAZ868438010463480A
80001703RAJA TALLET IMTIAZ868438010463480B
80000756RIZWAN MALIK868438010471046
80000756RIZWAN MALIK868438010471046A
80000745SHOUKAT IQBAL868438010465857
80000745SHOUKAT IQBAL868438010465857A

We want to show User wise all devices in one row like below

User IDNameDevices
80004022ABDUL AZAM868438010471186, 868438010471186A
80001571ABDUL AZIZ868438010470071, 868438010470071A, 868438010470071B
80001594AKHLAQ AHMED868438010470147, 868438010470147A, 868438010470147B, 868438010470147C
80001591ASIM IQBAL868438010471145, 868438010471145A, 868438010471145B, 868438010471145C
80001705IMRAN UL HASSAN868438010464702, 868438010464702A, 868438010464702B
80006221MUHAMMAD AHMED KHAN868438010467937, 868438010467937A
80001703RAJA TALLET IMTIAZ868438010463480, 868438010463480A, 868438010463480B
80000756RIZWAN MALIK868438010471046, 868438010471046A
80000745SHOUKAT IQBAL868438010465857, 868438010465857A

Is this possible? Thank you

21 Replies
er_mohit
Master II
Master II

on expression side

aggr(concat(Device,','), [User ID], Name)

Not applicable
Author

Thank You Manish for your time.

Means you say if we want to extract via script it will always take time to reload. no help on this..

Ok Thank you for all

MK_QSL
MVP
MVP

Reload time will depends on your Data. Here your have 10M rows and due to grouping it is taking more time.

But if you use the same CONCAT function in Table/Chart instead of Script, it will take more time for everytime you select/deselect your dimensions.

Not applicable
Author

Exactly that's why we need to work on script rather then use Table/Chart but as you say it will always take time due our data we can't do anything on it....

rbecher
MVP
MVP

But you could limit UI activities with conditional views etc. For instance, show only the concatenated devices if one user (or something else) is selected. From my point of view it makes no sense to lose details and do this transformation on script.

Astrato.io Head of R&D
Not applicable
Author

Becher,

Conditional view is for just hide or show the chart not limit the records..

If you look out the data we are not losing any detail we have all record in the data in the form of 1 row.

rbecher
MVP
MVP

I meant it is not a problem to have may records. It is a problem if you provide a wrong UI.

And, how do you count Devices then if you want to know it for some aspects?

Astrato.io Head of R&D
Not applicable
Author

If we want to count devices, simple we count ","+1 in Devices because it separate the devices

rbecher
MVP
MVP

Interesting. Tell me how you wanna do this? Do you think string operations are faster than counting field values??

Astrato.io Head of R&D
Not applicable
Author

Ralf,

First of all we don't want to count No of devices once we need this i prefer to find Length of the field and work with that because Len function is much faster then Count But if we need to count No. of devices but we dont want that.