We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

HELP: How to get previous row value to the new or the next row?

tarunIMDG
7 - Meteor

How can I achieve the Expected result as In the given data set??

 

The column N is calculated using the following condition -

IF             column E  is NOT NULL   OR   column F = "Rejected"  OR  column g = "Yes"

THEN      0

ELSE       [column D]+[Row-1:column N]

ENDIF

 

So, row 2 and row 15 gives the value as 0 which is expected but if the same condition is fulfilled again like in row 8 and row 25 then it should return the previous value of row 8 (5) and row 25 (9.48) respectively.  The new values of row 8 and row 25 should be 5 and 9.48 respectively.

 

 

tarunIMDG_0-1650683824063.png

 

 

 

8 REPLIES 8
Qiu
21 - Polaris
21 - Polaris

@tarunIMDG 
I can get the same result as your column 'N'.

Can you expain below in details


if the same condition is fulfilled again like in row 8 and row 25 then it should return the previous value of row 8 (5) and row 25 (9.48) respectively.  The new values of row 8 and row 25 should be 5 and 9.48 respectively.

For Row 8 and 25, the value for column 'Status' is 'Rejected', therefore it is zero according to your conditional statement.

0423-tarunIMDG.PNG

flying008
15 - Aurora

Hi,@tarunIMDG 

 

I wish the flow can help you.

 

录制_2022_04_23_14_52_36_638.gif

tarunIMDG
7 - Meteor

@flying008 could you please share your workflow shown above?

tarunIMDG
7 - Meteor

@flying008 

 

I tried to replicate this but it is not getting applied to all the records.  I also updated the Multirow formula to " IIF([Tile_SequenceNum]>=2, [Row-1:Field-1], [Field-1]) " but it didnt work.  Do you have any recommendations?

 

In the given screenshot - The same value as in Title_SequenceNum 2 should be there for 3 and 4.

 

tarunIMDG_0-1650731867643.png

 

flying008
15 - Aurora

Hi,@tarunIMDG 

 

Dear, your formula is right, but in the case, you need choose option "Update Existing Fieldinstead of "Create New Field" !

Because:

1- Update Existing Field: always get the reference value after calculate row.

2- Create New Field: only get the reference value one by one from original row.

 

So, you can update existing Field [Field-1] , then get expect result.

tarunIMDG
7 - Meteor

Hello Dear @flying008 

I used the below formula to update the existing field for the missing values. 

IF [Tile_SequenceNum] = 1 THEN 0
ELSEIF [Tile_SequenceNum] > 1 THEN [Row-1:Field-1]
ELSE [Principle]+ [Row-1:Field-1]
ENDIF

 

Looks like it took care of my concern but still need to confirm on my larger data set. Thank you for your assistance and I will keep you posted on the thread. 😍 🤗 👍

 

tarunIMDG_0-1650765214774.png 

tarunIMDG_1-1650765443336.png

 

flying008
15 - Aurora

Hi,@tarunIMDG 

 

So cool for your formula, maybe you can give me a like or solution? 

tarunIMDG
7 - Meteor

@flying008 

 

Yes no problem at all.😊

I have previously tagged your response as a solution to my problem. Thank you again!

Labels
Top Solution Authors