Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to combine 2 rows into one

Hello,

I have below table

  

Order#Status
1Booked
1

Order Hold

And I want to convert above into below table

  

Order#

Status
1Hold

Thanks in Advance.

3 Replies
sasiparupudi1
Master III
Master III

is there id value for HOLD also?

Order#Status
1Booked

1

1

Order

Hold

or

Order#Status
1Booked
1

Order Hold

?

Anonymous
Not applicable
Author

Hi Sasidhar,

What I want to do is . If the id 1 has value booked and order_hold both .

I want to assign a new value as ''HOLD" .

And consider only one row instead of 2.

sasiparupudi1
Master III
Master III

In a chart May be like if(Index(Aggr(Concat(Status,','),ID),'Booked')>0 And (Index(Aggr(Concat(Status,','),ID),'order_hold')>0,'HOLD')

if you want to do it in the script level, try like below

Left Join(your Table)

Load

ID,

Concat(Status,','),ID), ConcatenatedStatus

Your Table

;

Final:

Noconcatenate Load *,

if(wildmatch(ConcatenatedStatus,'order_hold'),'Booked')>0,'HOLD') As NewStatus

Resident Your Table

;

Drop Your Table