We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to have single expression written to achieve multiple conditions

NeilSwithin
7 - Meteor

Hello,

 

I have a situation which I'm not able to address. There are 7 different types of input conditions in my example but the result should always be the sum of the columns that appear in the input file. The output column name is "Newly Identified" Input column headers are "31-60" "61-90" and ">90". As per attached, file 2 is missing header ">90" yet the results should show up under newly identified column and same goes to other headers, if the input is missing any 1 of the 3 header, the expression should capture the values from available headers. Please help me resolve this, thanks! 

4 REPLIES 4
RaphaelSilva
9 - Comet

I am a bit confused with what the expected outcome should be, the workflow below uses a template to union all files, then change nulls to zero, so it can sum them all together.

NeilSwithin
7 - Meteor

Hi Raphael

 

Thank you for responding, regarding the expected output it should always be the count of the column that comes up in the input file. Its could be any of the combinations shown in the input files, could be (31-60 & 61-90) or (31-60 & &>90) or (31-60 & >90) or (61-90 & >90) or just (31-60) or (61-90) or (>90)

 

Sorry if I'm making this hard. The input file may have any 1 of the above inputs only not all of them. Hence the union of the inputs might not work. 

Qiu
21 - Polaris
21 - Polaris

@NeilSwithin 
You mean you want to pull all the data in despite the data schema is different?

We have a macro can do that if yes.

Input.png

NeilSwithin
7 - Meteor

Hi Qiu,

 

Thank you for responding, I think in your workflow the input file has all the possible conditions that I have mentioned in different sheets. However, the result I'm trying to achieve should provide me the values even in case of one of the columns are not available in the input file. 

Example 1: Input file has headers 31-60 and 61-90. Output column (Newly Identified) will show the value count.

Example 2: Input file has headers 61-90 and >90. Output column (Newly Identified) should show the value count and should not through an error that 31-60 column is missing.

 

This is the problem I am currently facing. 

Labels
Top Solution Authors