Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Update one segment of values in an Alteryx table with a single value from the segment

Anirban
6 - Meteoroid

Hi All,

 

I have my data in segments. Say A1 to A10 is the first segment and then it repeats again A1 to A10 in the second and subsequent segments. Now I want to update the values of each of this segment based on a certain value present in that segment.

 

So for example if the first A1 to A10 has a value of 123 for A5, every value from A1 to A10 in the that segment will be updated with value 123.

 

For the next segment of A1 to A10 if A5 has a value of 345, every value from A1 to A10 in the that segment will be updated with value 345 and so on.

 

The challenge I am facing is that the value to be updated for a specific segment is in the middle of the segment and data both above and below needs to be updated with that value and in the next segment the value will need to change.

 

I am attaching the excel to show what is the current state and the desired state.

4 REPLIES 4
binuacs
21 - Polaris

@Anirban one way of doing this

image.png

Anirban
6 - Meteoroid

@binuacs Thanks a lot for providing the solution,

 

However I know have a more complex scenario now. There is now subsegment between the segments and the data needs to be updated based on the value cell. Please see the attached excel for the input and required output I am looking at

binuacs
21 - Polaris

@Anirban batch macro approach

image.png

Anirban
6 - Meteoroid

@binuacs Thanks a lot for the solution. It helped a lot

Labels