Alteryx Designer Desktop Discussions

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

Incremental value check

PB41091
8 - Asteroid

I have a data like below: (where I have A column and B column; A column has sequence same as given in data table i.e 1+,1,2+,2,2-,3+ and so on. B column has also different values, (for example purpose i used 2 values only.) I have 3 asks.

 

1.  want to retain the sequence of A column as it is; and with 1 cell moving downward (from 1+ to 1, 1 to 2+, 2+ to 2 and so on), considering B column value 1+,0.5% ; 1,0.5% and so on, want to compare C column data. Data in C column must be equal or incremental as compared to previous cell. 

 

2. Same condition is applicable for B Column. With the incremental value of B column 0.5% to 25%, value for 1+,25% must be greater or equal to 1+,0.5%.....need to check this for all combinations. 1,0.5% must be equal or lesser than 1,25%.

 

3. Generate output column as comments/flag

 

Input Data:

SA columnB ColumnC Column
a1+0.5%250
a10.5%254
a2+0.5%260
a20.5%260
a2-0.5%260
a3+0.5%260
a30.5%270
a3-0.5%270
a4+0.5%270
a40.5%270
a4-0.5%270
a5+0.5%280
a50.5%282
a5-0.5%284
a6+0.5%286
a60.5%288
a6-0.5%290
a70.5%292
a80.5%300
a90.5%350
a100.5%500
a1+25%300
a125%305
a2+25%310
a225%320
a2-25%340
a3+25%340
a325%353
a3-25%360
a4+25%372
a425%381
a4-25%391
a5+25%400
a525%410
a5-25%420
a6+25%429
a625%440
a6-25%448
a725%460
a825%467
a925%475
a1025%480

 

Output Data

A columnB ColumnValueCheck2
1+0.5%250 Correct
10.5%254 Correct
2+0.5%260 Correct
20.5%260 Correct
2-0.5%260 Correct
3+0.5%260 Correct
30.5%270 Correct
3-0.5%270 Correct
4+0.5%270 Correct
40.5%270 Correct
4-0.5%270 Correct
5+0.5%280 Correct
50.5%282 Correct
5-0.5%284 Correct
6+0.5%286 Correct
60.5%288 Correct
6-0.5%290 Correct
70.5%292 Correct
80.5%300 Correct
90.5%350 Correct
100.5%500 Correct
1+25%300 Correct
125%305 Correct
2+25%310 Correct
225%320 Correct
2-25%340 Correct
3+25%340 Correct
325%353 Correct
3-25%360 Correct
4+25%372 Correct
425%381 Correct
4-25%391 Correct
5+25%400 Correct
525%410 Correct
5-25%420 Correct
6+25%429 Correct
625%440 Correct
6-25%448 Correct
725%460 Correct
825%467 Correct
925%475 Correct
1025%480Incorrect
2 REPLIES 2
cjaneczko
13 - Pulsar

I am not following what is going on in the data set but it sounds like you can use a Multi Row formula to compare the Row0 to Row-1 or Row+1. Perform the calculation with an IF/THEN statement and then have it either be 'Correct' or 'Incorrect' based on the condition you need. It would be a little easier to figure out what's going on if you included a formula of what the test is between each row. 

jdminton
12 - Quasar

See if this workflow is what you're looking for. The record ID should keep them in the same order throughout, but if it is getting changed in your data, you would either turn off AMP engine or use a sort before the multi-row columns.

Labels