Skip to content
Advertisement

Qlikview – Insert a recno() for each change in a column

I have a table with Document Numbers and items. We have integrated our software to a third party accounting package. The import to the third party does not take our document line numbers, however, it posts into their backend in the same order.

For Example:

My Software:

enter image description here

The import to the Third Party Software (only takes limited fields as they do not manage stock/batch controlled stock):

enter image description here

My goal is to create a new column in the second table to add row numbers for each change in Document numbers. This will allow me to create a unique key that is what I need to link the two databases’ tables together.

enter image description here

Advertisement

Answer

If I understand the issue correctly, what you want to do is to start with [Row. No.] 1 for every new value in [Doc. No.], and increment the field [Row. No.] by 1 as long as [Doc. No.] is the same as the previous row. One way to accomplish that could be the following:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement