Hi Team,
I have requirement as below where I need to add increment number sequence based on the context value.
1st value should have sequence as 1 and if it has same value in next context, it should increment by 1 (for all the values in that context)
eg:
20996_1
20996_1
<Context Change> (below 2 entries should be increment by 1 and should have same increment value)
20996_2
20996_2
I am already sorting the records and this is a sample output
Expected Output is
20917_1
20918_1
20919_1
20992_1
20992_2
20992_2
20920_1
20921_1
20922_1
20990_1
20990_1
20914_1
20915_1
20916_1
20996_1
20996_1
20996_2
20996_2
20999_1
20999_1
20999_1
20999_1
I think this can't be achieved with standard functions, please help with UDF to achieve it.
Thanks,
Varun
Request clarification before answering.
Hi Team,
I have managed the logic using standard functions and its working fine.
Thanks,
Varun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.