Free Trial

Alteryx Designer Desktop Discussions

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

Multi row tool - How to change a value based on TRUE or FALSE

rodalferreira
8 - Asteroid

Hi guys,

 

I have a challenge which I couldn't find a correct solution so far and I thought you could help me.

 

In the dataset below every code has 2 rows. I want to create a new column called ACCESS which will check the status of each code in both lines. If I have 2 NO, the access will be NO, if I have at least 1 YES, the access will be YES. 

 

At the end, I want to have only the code finishing with 30 as NO and all other YES.

 

rodalferreira_0-1603920980361.png

 

I tried some IF statements with multi-row tool but I couldn't get the solution.. 

 

This is a sanitised data, in the real data there are some codes with only 1 row, which the access will be the same as the status but I think in this case I will group by using Sumarize tool and it won't be a problem. 

 

Any help is appreciated.

 

Thanks.

 

Rod

3 REPLIES 3
Maskell_Rascal
13 - Pulsar

Hi @rodalferreira 

 

Instead of using a formula tool, my approach would be to use a sort, summarize, and join tool. 

 

Something like the below:

Maskell_Rascal_0-1603922256387.png

 

I've included the workflow for you to try out. 

 

If this solves your issue please mark the answer as correct, if not let me know!

 

Thanks!

Phil

jdunkerley79
ACE Emeritus
ACE Emeritus

I would suggest using a multi-row formula tool grouped by code:

jdunkerley79_0-1603922273597.png

 

with an expression of:

'yes' in ([Row-1:status],[status],[Row+1:status])

 

Quick sample attached

morr-co
10 - Fireball

Hi @rodalferreira : you could do this with a Multi-Row Function but I sometimes find these scenarios easier to solve takng the "long way". Here is an example.

Screen Shot 2020-10-28 at 3.59.46 PM.png

Labels
Top Solution Authors