ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Dynamically selecting columns which has values not equal to 0

Lumjing
8 - Asteroid

Hi I have a data set and below is a sample of it. What I am trying to do here is compare column A and B and update C is A and B is not matching. I want an out put where It should should only columns where C values are not equal to 0. I have about 30 columns and in this 30 check columns I want only the check columns where the output value is not equal to 0. From the below sample table I want only column D,E,DE_Check and H,I,HI_Check should only show up as DE_Check and HI_Check where rows is not equal to zero. this is like a check that I am planning to product. Thanks for the help 

 

S/NoABAB_CheckDEDE_CheckHIHI_CheckFGFG_CheckLMFG_Check
1110311220110110
2220110121220220
3330231321330330
4 REPLIES 4
OllieClarke
16 - Nebula
16 - Nebula

Hi @Lumjing 

Here's one way of doing this:

OllieClarke_0-1764326362156.png

OllieClarke_1-1764326384151.png

We can transpose the data to then find the check columns that we want. We then parse from the names of those columns, the base column names, and use that list to join as a filter to get all the columns we want. Then we can cross-tab to go back to the original structure.

 

This will return all the rows which for those columns. If you only want the columns where there is a non-0 check value then let me know and I can show you how to edit the workflow to do that.

 

Hope that helps,

 

Ollie

 

binu_acs
21 - Polaris

@Lumjing another approach

binu_acs_0-1764370225283.png

 

flying008
15 - Aurora

Hi, @Lumjing 

 

Another dynamic resolution for you.

Spoiler
IF Contains([Name], '_Check') && [Sum_Value] > 0 
THEN [Name]
ELSEIF (Contains([Row+1:Name], '_Check') && [Row+1:Sum_Value] > 0) || (Contains([Row+2:Name], '_Check') && [Row+2:Sum_Value] > 0)  
THEN [Name]
ELSE '0_' + [Name]
ENDIF

录制_2025_11_29_10_23_02_949.gif

 

S/NoDEDE_CheckHIHI_Check
1311220
2110121
3231321

 

Lumjing
8 - Asteroid

@OllieClarke It worked. Thank you so much for the quick solution

Labels
Top Solution Authors