Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
christiane2003
Contributor II
Contributor II

Merge columns

Hi all,

I like to merge several columns one below the other as follows:

Original table:

CaseStartDestinationDistance
C1N1N210000
C1N2N350000
C1N3N160000
C2N4N525000
C3M1M280000
C3M2M370000

Target:

 

CaseNodeDistance
C1N1-
C1N210000
C1N350000
C1N160000
C2N4-
C2N525000
C3M1-
C3M280000
C3M370000

Any idea? Thank you very much for help

1 Solution

Accepted Solutions
christiane2003
Contributor II
Contributor II
Author

Hi Sunny,

I'm sorry for late respond. Thank you for your help. It works fine.

Best regards

View solution in original post

3 Replies
sunny_talwar

May be this

Table:

LOAD * INLINE [

    Case, Start, Destination, Distance

    C1, N1, N2, 10000

    C1, N2, N3, 50000

    C1, N3, N1, 60000

    C2, N4, N5, 25000

    C3, M1, M2, 80000

    C3, M2, M3, 70000

];


FinalTable:

LOAD Case,

Start as Node

Resident Table

Where AutoNumber(RowNo(), Case) = 1;


Concatenate (FinalTable)

LOAD Case,

Destination as Node,

Distance

Resident Table;


DROP Table Table;

christiane2003
Contributor II
Contributor II
Author

Hi Sunny,

I'm sorry for late respond. Thank you for your help. It works fine.

Best regards

View solution in original post

sunny_talwar

Glad I was able to help. Please mark the correct response as the correct answer instead of marking your thank you as correct.

Best,

Sunny