Problem with Stage Variable Loop
Posted: Wed May 27, 2015 2:48 am
Hi guys,
Good afternoon.
I'm having a problem with my stage variable.
I am using it as a group #. but the problem is, it is inconsistent.
My data is this:
01|XXX
02|XXX
01|XXX
02|XXX
03|XXXX
01|XXX
02|XXX
03|XXXX
I want to group it this way:
1 01|XXX
1 02|XXX
2 01|XXX
3 02|XXX
3 03|XXXX
4 01|XXX
4 02|XXX
4 03|XXXX
but the actual result is:
1 01|XXX
1 02|XXX
2 01|XXX
0 02|XXX
3 03|XXXX
0 01|XXX
0 02|XXX
0 03|XXXX
The logic is: If the svGroupNum encounters a "01", it will add 1, Else svGroupNum.
my code is:
svGroupNum <-- If Col="01" then svGroupNum+1 else svGroupNum.
I can't see where the problem is. Does the partioning has something to do with?
Any help please.
Thank you.
-keith
Good afternoon.
I'm having a problem with my stage variable.
I am using it as a group #. but the problem is, it is inconsistent.
My data is this:
01|XXX
02|XXX
01|XXX
02|XXX
03|XXXX
01|XXX
02|XXX
03|XXXX
I want to group it this way:
1 01|XXX
1 02|XXX
2 01|XXX
3 02|XXX
3 03|XXXX
4 01|XXX
4 02|XXX
4 03|XXXX
but the actual result is:
1 01|XXX
1 02|XXX
2 01|XXX
0 02|XXX
3 03|XXXX
0 01|XXX
0 02|XXX
0 03|XXXX
The logic is: If the svGroupNum encounters a "01", it will add 1, Else svGroupNum.
my code is:
svGroupNum <-- If Col="01" then svGroupNum+1 else svGroupNum.
I can't see where the problem is. Does the partioning has something to do with?
Any help please.
Thank you.
-keith