Hello guys,
I'm pretty new to Alteryx, so far I was doing good but here I got stuck.
I'm attaching a file below where I want to apply condition on few columns and separate the "School" column values based on it. Conditions are mentioned in the table below:
Column Name | 32 Questions | 28 Questions |
P9 | 1,2 | 3,4,5 |
P11 | 3,4,5 | 1,2 |
P17 | 1,2 | 3,4 |
P18 | 1,2 | 1,2,3 |
P25 | 1,2 | 3,4,5 |
P26 | 1,2 | 3,4 |
P27 | 3,4,5 | 1,2 |
P28 | 1,2,3 | 1,2 |
All conditions mentioned in the table should be meet Suppose if column P9 has values 1,2 it is 32 Question and if 3,4,5 than it is 28 Question row and so on for the other mentioned in the table. I want to separate all the rows based on 32 and 28 questions based on the above table condition.
So there is gonna be two files one for 28 questions and another for 32 questions.
OR
Can also add a new column naming "Questions" and say 28 and 38 questions based on the condition for a single file.
Any help would be greatly appreciated. Thanks in advance.
***UPDATED***
Solved! Go to Solution.
This looks good and I might use it for some of my problems but this is not what I'm looking for.
So basically you used the if-else, where 1,2 is 32 Question and 3,4,5 are 28 Question but its checking condition for all the columns and giving the count. I want to separate the file based on the condition that I have mentioned in the table above to the 32 and 28 questions.
Sorry for the confusion.
@sumitrathore
Add to the effort of @echuong1 , I have modified the workflow a bit and hope this is what you are looking for.
The table I have mentioned in the main body are all the conditions that we want to check before saying it is a 32 or 28 question.
So in the table are all the conditions that need to be met before we add a column. Both of you just checked a condition where 1,2 is 32 questions and 3,4,5 is 28 questions but it is way more complicated not just one condition there are multiple conditions that are mentioned in the table. I'm so sorry for the confusion and not being clear.
@sumitrathore
I am starting to get what you mean.
In your snapshot, only a few conditions are given.
However, in your Excel Data, there are like 32 of them.
How to do this?
@sumitrathore
So this is what you need?
Like you did in previous solution need 2 files based on only those conditions that are mentioned in the table and rest of them should be there as it is, or you can just check the condition and place a new column after P32 that says 28 and 32 base on all the condition at once. Thanks for understanding and being so quick.
Just by adding a filter, I'm able to get what I wanted to.
Thank you so much 😊
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |