Qlik Community

Ask a Question

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Add Order Position to a table in the LOAD skript depending on orderid

Hello together,

 

i am looking for a solution to the following problem.

I have a table which i load via skript:

OrderIdArtikelNROrderItemQuantity
381180001001
381123540032
381123540114
381123540091
381123540142
381123544742
381123540102
381123540002
381123540124
3812622175010
381280001001
381580001001
381512319865

 

Now i need to add an Order Position (Field OrderPos) through the skript LOAD statement  depending on the OrderID, always counting up by 1 starting from 1.

 

This should be the result:

OrderIdOrderPosArtikelNROrderItemQuantity
3811180001001
3811223540032
3811323540114
3811423540091
3811523540142
3811623544742
3811723540102
3811823540002
3811923540124
38121622175010
3812280001001
3815180001001
3815212319865

 

It sounds simple, but sadly i cannot come up with a solution myself.

1 Solution

Accepted Solutions

Perhaps this?

Load OrderID, AutoNumber(Rowno(), OrderID) as OrderPos, ArtikelINR, OrderItemQuanity From Source;

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

2 Replies

Perhaps this?

Load OrderID, AutoNumber(Rowno(), OrderID) as OrderPos, ArtikelINR, OrderItemQuanity From Source;

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

Contributor III
Contributor III

Hello Anil_Babu_Samineni,

that worked perfectly. Thanks you very much for your help!

Best wishes from Germany,

 

Hermann