Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Basic Multi-Row Formula Tool Question

BarleyCorn
8 - Asteroid

Hi,

 

I am Struggling with the Multi-Row Formula tool logic. Hope someone can help?

 

If the Status = 'J' then copy down J, if Status = 'P' then copy down P, Else 'R' - see below:

 

Thanks

StatusAns
RR
RR
JJ
RJ
RJ
PP
RP
RP

 

7 REPLIES 7
ChrisTX
15 - Aurora

Is the Ans column your expected output?  I'm not understanding your required logic.  Can you explain in more detail?

 

Chris

cpituley
8 - Asteroid

Hi BarleyCorn,

 

This formula worked for me to replicate your results

 

IF [Status] = "J" then "J"
Elseif [Status] = "P" then "P"
Elseif [Row-1:Status] = "J" or [Row-1:Answer] = "J" Then "J"

Elseif [Row-1:Status] = "P" or [Row-1:Answer] = "P" then "P"

Else "R" Endif

 

Let me know how it works for you.

 

+Attachment

 

Cheers,

Cameron

BarleyCorn
8 - Asteroid

Hi Cameron,

 

Thanks for your answer. But maybe I was not clear enough. Only on column, "Ans" does not exist, its what I want "Status" to become. So if row = P, all the following rows should be P, if row = J, all following rows should = J until it comes to a new letter.

 

Hope this is clear?

 

Tom

 

BarleyCorn
8 - Asteroid

Hi Chris,

 

Yes, "Ans" is where I need to go. So just one column, select "Update Existing Field" then when row = R, leave R, when row = J, all following rows = J until a new letter is display, say P, then all rows after P should be P.

 

Hope this is clear?

cpituley
8 - Asteroid

Hey Tom,

 

I might be misunderstanding. Do you need this to work for any letter/word or hard coded with J/P/R? 

 

Making this dynamic to update based on any word/letter will require a little bit of a different approach. 

 

If it is hard coded, the formula I used replicates the desired result above. Can adjust "Answer" to be "Ans" instead and can switch create new field to update existing. 

 

Looking forward to hearing from you. 

 

Best,

Cameron

BarleyCorn
8 - Asteroid

Hi Cameron,

 

Thanks for getting back to me.

 

There are only three options, R or P or J. One column to be "Update Existing Field". So, read col. Status, when you see R leave R, when you encounter a P, all following rows should be changed to P, when you encounter J, All following rows should be J, else R.

 

Hope this is clear. The Ans column I included is what I would like to get to.

 

Thanks

Tom

 

BarleyCorn
8 - Asteroid

Hi Cameron,

 

Finally got your solution to work.

 

Thanks

 

Tom

 

 

Labels