I have the following table
Name | Code |
A | |
A | 1 |
B | |
B | 2 |
C | |
C | 3 |
some rows have nulls in the code column and I want to repeat the same value as the row below if the value in the name column is the same. Below the results I'm expecting:
Name | Code |
A | 1 |
A | 1 |
B | 2 |
B | 2 |
C | 3 |
C | 3 |
Any ideas on how to do this? Thanks
Solved! Go to Solution.
Hey @jdbustamantec,
Multi-Row does the trick:
IF IsNull([Code])
THEN [Row+1:Code]
ELSE [Code]
ENDIF
Make sure to tick "Group By" Name to achive this: " if the value in the name column is the same."
See the attached example.
Hello @FrederikE,
I have the same question as @jdbustamantec .
But on my data, I think I would have to use both Row-1 and Row+1. Is there a way to do this using 1 tool?
Name | Code |
A | |
A | 1 |
A |
|
B | |
B | 2 |
B | |
C | |
C | 3 |
C |
or is there any smarter way to do this if I have multiple columns that needs similar method?
Name | Code | Code2 | Code3 |
A | X | ||
A | 1 |
|
|
A |
|
| Y |
B | Y | ||
B | 2 | X | |
B | |||
C | Y | ||
C | 3 | ||
C | X |
Thank you in advance!
use summarize and concate the value? remove the delimiter of course.
but this only apply it only have 1 value each.
ohh your right! thank you for the idea!
I can just use the Join tool to add the concatenated columns again.
Tested it and works, Thank you!