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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
vibhapratha
Contributor II
Contributor II

Create duplicate rows - with interchanged column values from Original rows

Hi,

The data available for loading is shown in 'Loaded Data'.
I would like to convert it into 'Required'.

Mainly I need to

                   1. Duplicate the original row.

                   2. Flip B as S or S as B

                   3. Add values (interchange values) from other columns in original row--> to the duplicate row.

Currently I am able to achieve this via macros. But since I have many such data, it is taking a lot of time.
Can anyone suggest me how I can handle this in QlikView itself ?

It will save enormous time for me.

Thanks.

 

clipboard_image_0.png

 

Labels (1)
1 Solution

Accepted Solutions
Arthur_Fong
Partner - Specialist III
Partner - Specialist III

There you go:

MC.PNG

Refer updated qvw below for reference.

Thanks and regards,

Arthur Fong 

View solution in original post

5 Replies
Arthur_Fong
Partner - Specialist III
Partner - Specialist III

Hi,

U can try concatenating the tables:

     1. Load the original table. (Ex: Table A :column A1, A2, A3, A4, A5,A6,A7)

     2.  Then do

           concatenate(A)

           load "S" as A1,

                                   A2,

                                   A3, 

                                   A4,

                                   date(A4,'DDMMYYYY') as A5,

                                  A6,

                                  A6 as A7

            resident A;

 

Thanks and regards,

Arthur Fong

Arthur_Fong
Partner - Specialist III
Partner - Specialist III

Sample result as shown below:

MC.PNG

Refer attached qvw below for reference.

Thanks and regards,

Arthur Fong

vibhapratha
Contributor II
Contributor II
Author

Thank you very much for your solution. It was very useful and I was able to apply it. It  saves a lot of time.

I need to perform the concatenation on if the 'Product' field value is 'Swap'.
Please guide me.

clipboard_image_0.png

Arthur_Fong
Partner - Specialist III
Partner - Specialist III

There you go:

MC.PNG

Refer updated qvw below for reference.

Thanks and regards,

Arthur Fong 

vibhapratha
Contributor II
Contributor II
Author

Thank you. This method works perfectly !! 👍