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: 
swarup_malli
Specialist
Specialist

How to concatenate rows based on certain conditions?

Hi,

   My requirement is to concatenate rows based on certain conditions.

    There are 3 fields

  

1.png

The field WARRANTY_CLAIM contains numbers , TEXT_NOTE field contains comments  and the filed NOTE_SEQ indicates sequence.

The problem here is the field Text_NOTE holds comments, the comments are distributed over multiple rows.

  What i mean by that is (see the attached file) the comment " Some issue with the component ,it broke and has to be replaced by the end of next month" has been broken down and distributed in 3 rows.

2.png

Currently the values  in the field NOTE_SEQ 1305 indicates the start of comment,1306 indicates next comment followed by 1307 so on which ends at 1312.

Similarly there are comments that start at 1205..may go till 1212

some times a comment could fit in one row itself ..so it will have just a starting value of 1205 or 1305 (1205 or 1305 or 1605 indicate the start of comments)

followed by a row with a different warranty claim number which may have the value 1605 under the field NOTE_SEQ.

I'm trying to concatenate all the rows ..which should look like (see below)

3.png

1 Solution

Accepted Solutions
Not applicable

Here is the file with the concatenated NOTE_SEQ field included. I noticed you had that in your question, but forgot to include it.

View solution in original post

8 Replies
Not applicable

See attached.

Not applicable

Here is the file with the concatenated NOTE_SEQ field included. I noticed you had that in your question, but forgot to include it.

swarup_malli
Specialist
Specialist
Author

Rebecca,

  Very impressive the way you did it. Its very close to what I wanted .

 

new_2nd_post.png

Is it possible to display 1205 ( see fig above) as a separate record  ( I have circled it in red in the fig above) for record 1200590.(note 1200590 should appear twice in the table one record for 1205 series and one for 1305 series...so on )

My requirement is values starting 1205..to 12012 in  NOTE_SEQ must appear as one record for claim number 1200590 (circled in green)

and values starting 1305..to 13012 in  NOTE_SEQ must appear as another  record for claim number 1200590 (circled in green)

Is it possible to make 1200590 appear twice in the table ie one record for 1205  and the other for concatenated 1305,1306,1307.(note in the snap I have attached above I have circled the number in red)

Thank you

Swarup

I

Anonymous
Not applicable

Not applicable

That definitely makes it more complicated. I am not sure how to achieve that, but I can play around with it. It may be above my head though!!

swarup_malli
Specialist
Specialist
Author

Thank you Rebecca

swarup_malli
Specialist
Specialist
Author

I was able to find a work around.

By creating a separate qvd for 1205..series ,one for 1305..series ,so on.

Thank you for the logic Rebbeca, It really solved the issue

Regards

SM

Not applicable

I am glad you figured it out! I played around with it for a little while with no luck and then got slammed at work...