Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Conditional Field Formula

Mario36
8 - Asteroid

Here's what I want to achieve, If a column contains the value '1' then the next columns should be null / blank. Grateful if someone could help me achieve this.

BEFORE
FieldNameGroup_1Group_2Group_3Group_4Group_5Group_6Group_7
Group_111.11.21.31.41.51.6
Group_21.111.11.21.31.41.5
Group_31.21.211.11.21.31.4
Group_41.31.31.211.11.21.3
Group_51.41.41.31.211.11.2
Group_61.51.51.41.31.211.1
Group_71.61.61.51.41.31.21
        
        
        
AFTER
FieldNameGroup_1Group_2Group_3Group_4Group_5Group_6Group_7
Group_11      
Group_21.11     
Group_31.21.21    
Group_41.31.31.21   
Group_51.41.41.31.21  
Group_61.51.51.41.31.21 
Group_71.61.61.51.41.31.21
1 REPLY 1
NicoleJohnson
ACE Emeritus
ACE Emeritus

You should be able to get to this desired result with a little pivoting of your data + a Multi-Row formula. These are some more intermediate data prep concepts, but the general idea is to get your columns into rows so you can group by each FieldName field and check to see if the prior row is a 1 (or if it was set to blank because it saw a 1 in a previous field). Once you've identified what your new values should be, the Cross-Tab tool will pivot the data back into the right format. See attached for an example (including the formula that should get you the right info for checking if 1 was previously reached for each grouping).

 

ConditionalFieldFormula.JPG

Hope that helps! 

Cheers,

NJ

Labels