Assuming I have an input:
1234
1234
3435
1253
3455
3534
I want some specific no to be assigned to another column if the rows are the same. In the case above, a number 1 is assigned in new col to 1234 but once it changes to 3435, it changes to 2.
I tried this :
current: DS.Colname
previous: DS.Colname
New: current<>Previous
StageVar: If New then ....................................
It would have worked but I dont know how to specify current and previous properly. I mean the first row to be previous and the next row to be current.
Thank you
How to specify rows in a single column
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 17
- Joined: Mon Jan 16, 2006 2:11 pm
- Contact:
How to specify rows in a single column
ARSENAL GUNNERS GOONER
-
- Charter Member
- Posts: 130
- Joined: Mon Sep 06, 2004 3:05 am
- Location: Dubai,UAE
Hi kayarsenal,
Input
1234
1234
3435
1253
3455
3534
Output
1,1234
1,1234
2,3435
3,1253
4,3455
5,3534
If this is the output you are expecting then look at the solution at the end of this post.
viewtopic.php?t=97751
Input
1234
1234
3435
1253
3455
3534
Output
1,1234
1,1234
2,3435
3,1253
4,3455
5,3534
If this is the output you are expecting then look at the solution at the end of this post.
viewtopic.php?t=97751
Warm Regards,
Amruta Bandekar
<b>If A equals success, then the formula is: A = X + Y + Z, X is work. Y is play. Z is keep your mouth shut. </b>
--Albert Einstein
Amruta Bandekar
<b>If A equals success, then the formula is: A = X + Y + Z, X is work. Y is play. Z is keep your mouth shut. </b>
--Albert Einstein
Re: How to specify rows in a single column
Hi Kayarsenal,
A small change is to be done in your code.
current: DS.Colname
New: current<>Previous
previous: DS.Colname
StageVar: If New then ....................................
It should be in the above specified order,provided the data is already sorted.
Even this can be achieved via build-in transform funtion"RowComparewith Previous Value"
Hope this helps.
Correct me if i'm wrong.
Thanks.
A small change is to be done in your code.
current: DS.Colname
New: current<>Previous
previous: DS.Colname
StageVar: If New then ....................................
It should be in the above specified order,provided the data is already sorted.
Even this can be achieved via build-in transform funtion"RowComparewith Previous Value"
Hope this helps.
Correct me if i'm wrong.
Thanks.
kayarsenal wrote:Assuming I have an input:
1234
1234
3435
1253
3455
3534
I want some specific no to be assigned to another column if the rows are the same. In the case above, a number 1 is assigned in new col to 1234 but once it changes to 3435, it changes to 2.
I tried this :
current: DS.Colname
previous: DS.Colname
New: current<>Previous
StageVar: If New then ....................................
It would have worked but I dont know how to specify current and previous properly. I mean the first row to be previous and the next row to be current.
Thank you
-
- Participant
- Posts: 17
- Joined: Mon Jan 16, 2006 2:11 pm
- Contact: