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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
User12321
Contributor III
Contributor III

Combine Similar Columns

Hello,

I have fields Form Id, service1, service2, service3, fulfillment1, fulfillment2, fulfillment3, quality1, quality2, quality3.

I want to combine all similar columns and rename them as service, fulfillment and quality. 

How can I achieve this? Thank you so much!

Labels (1)
2 Solutions

Accepted Solutions
PrashantSangle

Try below code

Load 

Form ID,

service1 as Service,

fulfillment1 as Fulfillment,

quality1 as Quality

from table;

Concatenate

Load 

Form ID,

service2 as Service,

fulfillment2 as Fulfillment,

quality2 as Quality

from table;

Concatenate

Load 

Form ID,

service3 as Service,

fulfillment3 as Fulfillment,

quality3 as Quality

from table;

 

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

Vegar
MVP
MVP

If you have a longer list of column groups then it could be effective to perform a loop. Something like this:

FOR i =1 TO 3

LOAD 

   [Form ID],

   [service$(i)] as Service,

   [fulfillment$(i)] as Fulfillment,

   [quality$(i)] as Quality

FROM Sourec;

NEXT i

View solution in original post

2 Replies
PrashantSangle

Try below code

Load 

Form ID,

service1 as Service,

fulfillment1 as Fulfillment,

quality1 as Quality

from table;

Concatenate

Load 

Form ID,

service2 as Service,

fulfillment2 as Fulfillment,

quality2 as Quality

from table;

Concatenate

Load 

Form ID,

service3 as Service,

fulfillment3 as Fulfillment,

quality3 as Quality

from table;

 

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Vegar
MVP
MVP

If you have a longer list of column groups then it could be effective to perform a loop. Something like this:

FOR i =1 TO 3

LOAD 

   [Form ID],

   [service$(i)] as Service,

   [fulfillment$(i)] as Fulfillment,

   [quality$(i)] as Quality

FROM Sourec;

NEXT i