Alteryx Designer Desktop Discussions

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

Last Column Value

BRRLL99
11 - Bolide

Hi

 

I have following data , expected result I'm looking for last value of the column, I'm looking for optimized workflow

 

SL NOColumn-1Column-2Column-3Column-4Column-5
100ABCDE
101SDG  
102FRAH 
103GJW  
104SG   
105MG   

 

Expected Output:

 

SL NOColkumn-1Column-2Column-3Column-4Column-5Last Value
100ABCDEE
101SDG  G
102FRAH H
103GJW  W
104SG   G
105MG   G
12 REPLIES 12
DataNath
17 - Castor

Hey @BRRLL99, here's one way I'd go about this:

 

DataNath_0-1681383159059.png

 

We first Transpose the data to get all values alongside the [SL NO]:

 

DataNath_1-1681383186563.png

 

We then make a concatenated list - values Transpose in order and then Summarize in order of appearance:

 

DataNath_2-1681383212882.png

 

A simple Formula expression gets us the rightmost value i.e. the last in the concatenated list:

 

DataNath_3-1681383239785.png

 

After that we just Join back and sort! Hope this helps.

BRRLL99
11 - Bolide

I have concatenated the data using summarize 

how can i pick the last value dynamically ( without using text to columns tool)

original data has been made few changes

BRRLL99_0-1681388008624.png

 

DataNath
17 - Castor

@BRRLL99 if they're comma separated like in your example then there's a few ways you can do this, for example - string functions:

 

Right([List],
FindString(
ReverseString([List]),','))

 

RegEx:

 

REGEX_Replace([List], '.+,(.+)', '$1')

 

DataNath_0-1681388388122.png

 

Just replace [List] with your [Concat_Value] field.

RobertOdera
13 - Pulsar

Hi, @BRRLL99 

 

Kindly consider the below.

I hope you find it helpful - Cheers!

 

RobertOdera_0-1681405747627.png

 

flying008
14 - Magnetar

Hi, @BRRLL99 

 

There is a easy way for you want:

 

录制_2023_04_14_11_04_16_340.gif

BRRLL99
11 - Bolide

@DataNath @flying008 @RobertOdera 

 

there has been a update my data, I have 15 columns in similar way, my end goal is to pick last column value

expected output:

SL NOCOLUMN -1COLUMN -1 QCOLUMN -2COLUMN - 2 Q COLUMN -3COLUMN - 3 QCOLUMN -4COLUMN - 4 QCOLUMN -5COLUMN -5 QLast column Value
100A12B56C90D34E12E
101S15D4G100    G
102F99R34A120H56  H
103G54J77W88    W
104S34G44      G
105M19G55      G

 

 

 

INPUT:

SL NOCOLUMN -1COLUMN -1 QCOLUMN -2COLUMN - 2 Q COLUMN -3COLUMN - 3 QCOLUMN -4COLUMN - 4 QCOLUMN -5COLUMN -5 Q
100A12B56C90D34E12
101S15D4G100    
102F99R34A120H56  
103G54J77W88    
104S34G44      
105M19G55      
flying008
14 - Magnetar

Hi, @BRRLL99 

 

There are 2 ways to get it .

1- You only need change the filter condition from !IsEmpty([Value])  to REGEX_Match([Name], '.+\d$') && !IsEmpty([Value])

 

录制_2023_04_14_13_44_39_786.gif

 

2- You only need use Select tool or Dynamic Select tool to filter useless fields before transpose tool.

 

录制_2023_04_14_13_28_02_128.gif

BRRLL99
11 - Bolide

please share the file

DataNath
17 - Castor

Hey @BRRLL99, just need to change the Formula expression in my original workflow so it only takes the last letter:

 

DataNath_0-1681459809094.pngDataNath_1-1681459822053.png

Labels