Alteryx Designer Desktop Discussions

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

Comparison of values and creating one output column

PB41091
7 - Meteor

Hi,

 

I have below kind of data set; where I need to compare Value column corresponding to combination of A, B and C.

For example, row 1 has a1,b1,10 and its value is 115 then I have to search for row where I have a1,b1,10 with different value and corresponding date. We need to do this search and compare values only for consecutive dates. Lets say in my dataset I have 3 dates - 22-Jun-23, 20-Sep-23 & 23-Oct-23. We need to compare only 22-Jun-23 with 20-Sep-23 and later 20-Sep-23 with 23-Oct-23 (and so on for all the available dates.)

Create the output column "comments" as shown in sample output data below. (row comparison if not printed in output is okay, this for you to understand how the comparison is been made)

 

Input data:

SNABCValueDate
1a1b11011522-Jun-23
2a1b22012022-Jun-23
3a2b33011022-Jun-23
4a2b44014522-Jun-23
5a3b22012522-Jun-23
6a4b33015022-Jun-23
7a1b11012020-Sep-23
8a1b22012020-Sep-23
9a2b33011020-Sep-23
10a2b44014020-Sep-23
11a3b22010520-Sep-23
12a4b33013020-Sep-23
13a4b33012023-Oct-23
14a2b44014523-Oct-23

Output data:

SNABCValueDateComments
1a1b11011522-Jun-23 
2a1b22012022-Jun-23 
3a2b33011022-Jun-23 
4a2b44014522-Jun-23 
5a3b22012522-Jun-23 
6a4b33015022-Jun-23 
7a1b11012020-Sep-23Value change on 20-sep-23; comparison row 7 with row 1 
8a1b22012020-Sep-23No Change
9a2b33011020-Sep-23No Change
10a2b44014020-Sep-23Value change on 20-sep-23; comparison row 10 with row 4
11a3b22010520-Sep-23Value change on 20-sep-23; comparison row 11 with row 5
12a4b33013020-Sep-23Value change on 20-sep-23; comparison row 12 with row 6
13a4b33012023-Oct-23Value change on 23-oct-23; comparison row 13 with row 12
14a2b44014523-Oct-23Value change on 23-oct-23; comparison row 14 with row 10
3 REPLIES 3
ChrisTX
15 - Aurora

Why does this row get assigned a comment of "No Change"?

 

a2b64016020-Sep-23

 

Are rows assigned a comment "Initial" based on the earliest Date in the data set?  But this one row has a comment "Initial" when the Date is not the earliest in the data set:

a1b53014522-Oct-23

 

Why does a2 b6 40 not have a row for "Initial", and how should the logic assign a comment of "No Change", when the values of a2 b6 40 are first encountered?

 

Chris

PB41091
7 - Meteor

Apologies for creating confusion, I am reposting with better clarification

ChrisTX
15 - Aurora

Check out the Multi-Row Formula tool.  See attached workflow.

 

Screenshot 2024-01-24 070416.png

 

Chris

Labels