Alert: There is a planned Community maintenance outage October 16th from approximately 10 - 11 PM PST. During this time the Alteryx Community will be inaccessible. Thank you for your understanding!

Alteryx Designer Desktop Discussions

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

SUM by Column Header

JTCairns
8 - Asteroid

Hi All,

I'm trying to apply a rule to a set of columns i have (appx 90).  I want to say something along the lines of

 

If [Columnheader] contains [Keyword] then multiply [Columnvalue] by 12.

 

I have been looking at the multi row and field tools but i am struggling a bit. Any help would be great

Cheers

4 REPLIES 4
JTCairns
8 - Asteroid

I have tried this

 

IF CONTAINS([_CurrentFieldName_],"TOBEUSED") THEN [_CurrentField_] * 12
ELSE [_CurrentField_]
ENDIF

BenMoss
ACE Emeritus
ACE Emeritus

Your statement should work. Maybe you have the option 'Copy Output field Add' checked which is creating a new field for every variable on the far right of your data which you cannot see.

 

Attached example of your logic implimented and working.

 

Ben

LordNeilLord
15 - Aurora

Hey @JTCairns

 

I'd add a recordid and then transpose the data (grouping on recordid)

 

Add a formula tool with your formula

 

crosstab the table back (grouping on recordid)

JTCairns
8 - Asteroid

@BenMoss @LordNeilLord Thanks guys both of these suggestions helped

Labels