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.
SOLVED

Return coulmn header to rows with 0

ohruud
7 - Meteor

Hi there

 

I have a data set, (an example below)

ohruud_0-1594127035785.png

 

What I want to to is to say that if a row has zero, i would like it to return the column header. However, I have a lot of columns if which i need to do this.  Is there an easy way to do this rather than using an IIF function for each colum ?

 

Kind regards

2 REPLIES 2
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @ohruud,

 

You could use a multi-field formula to solve this:

 

IF ToString([_CurrentField_]) = '0'
THEN [_CurrentFieldName_]
ELSE [_CurrentField_]
ENDIF

 

Input:

Jonathan-Sherman_1-1594127462600.png

 

 

Output:

Jonathan-Sherman_0-1594127439422.png

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

 

ohruud
7 - Meteor

Thanks, that helped:)

Labels