Alteryx Designer Desktop Discussions

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

multi row formula with multiple conditions

Sifiso
8 - Asteroid

Hi all

I would like a logic that will change the [Exchange rate] if the four conditions (C1, C2 & C3) are met:

  1. Condition one: if [Cost rate] = [Row+1: Cost rate]

and

  1. [cost rate] < 0

And

  1. Condition two: if [Batch number] = [Row+1: Batch number]

and

  1. Condition three: if [ID] = [Row+1: ID]

Sifiso_0-1654534334061.png

 

desired outcome

Sifiso_1-1654534402363.png

 

4 REPLIES 4
Jon-Knepper
8 - Asteroid

Maybe something like this would work, iif([Cost rate] =[Row+1: Cost rate] && [Batch number] = [Row+1: Batch number] && [ID] = [Row+1: ID] && [cost rate] < 0,[Exchange rate](INSERT LOGIC FOR CHANGE),[Exchange rate]).  This can be accomplished using the multi row tool.  I am away from my designer right now other wise I would run a test.  I also noticed that there is a space behind the comma on some of your number values.  Is this true or is that just a typo?  Asking because it will affect your logic.

IraWatt
17 - Castor
17 - Castor

Hey @Sifiso, I assume row one C1 should be positive and condition 4 should be  [ID] = [Row-1: ID] for this to get the desired output. Also should the ',' in column one be '.'.? Could you also post your example data in a format which can be copied 

IraWatt
17 - Castor
17 - Castor

@Sifiso here's one way to do it:

IraWatt_0-1654535323603.png

Any questions or issues please ask :)
HTH!
Ira

 

binuacs
20 - Arcturus

@Sifiso In order to get the desired result I adjusted the formula

 

binuacs_0-1654535367974.png

 

Labels