Start Free Trial

Alteryx Designer Desktop Discussions

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

multi row formula, with more scenarios

EtamSoko
8 - Asteroid

hi Everyone,

 

hope you are not only able to help, but also explain me the logic behind the solution.

 

I need to compare 2 same dataset from 2 different sources. I already organized them into 1 Record ID for further needs so it looks like this now.

 

RecID Priority Source

1         2           A

1         2           B

2         2           A

2         1           B

 

what I want is to update Priority field as follows: IF priority value in A and B sources are = then leave priority value in B line as it is, if not = then copy thethe value from above. It doesn't matter if any of the field is empty, I need to copy down empty fields as well from Source A Prio to Source B prio. 

 

I would really appreciate if you could write a few words of the solution, I am a bit lost with which is Active row and how to set it this case.

 

thanks a lot!

MateK

2 REPLIES 2
zajaccount
9 - Comet

Hi,

 

fromat what I undestand, this is in fact just one condition - if the scenario is B, then take the priority from row above, if not - leave priority.

 

In this case, this should work:

 

if [Source] = "B" then [Row-1:Priority] else [Priority] endif

EtamSoko
8 - Asteroid

@zajaccount thanks for this. Instead of taking a step back and looking at it differently, I started to overcomplicate it...thanks!

Labels
Top Solution Authors