Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
leimgruber
Partner - Contributor II
Partner - Contributor II

How to build a delivery path

Hello

I have orders which a send over different locations. Now I would like to see the full path in one line but I face in problems to achieve it.

Example:

LOAD * INLINE [
Order, SendingLocation, ReceivingLocation
1, A, B
1, C, D
1, E, F
1, F, Z
2, B, G
2, G, M
2, M, A
]
;

What I would need at the end is a table like this

Order, DeliveryPath

1, A-B-C-D-E-F-Z

2, B-G-M-A

Any help is welcome.

Thanks

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Temp:

CrossTable(Direction, Node)

LOAD * INLINE [
Order, SendingLocation, ReceivingLocation
1, A, B
1, C, D
1, E, F
1, F, Z
2, B, G
2, G, M
2, M, A
]
;


Result:

LOAD Order, Concat(distinct Node, '-') as DeliveryPath

Resident Temp

Group By Order;

Drop Table Temp;



talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Temp:

CrossTable(Direction, Node)

LOAD * INLINE [
Order, SendingLocation, ReceivingLocation
1, A, B
1, C, D
1, E, F
1, F, Z
2, B, G
2, G, M
2, M, A
]
;


Result:

LOAD Order, Concat(distinct Node, '-') as DeliveryPath

Resident Temp

Group By Order;

Drop Table Temp;



talk is cheap, supply exceeds demand
leimgruber
Partner - Contributor II
Partner - Contributor II
Author

Thanks Gysbert it works perfect.