How to combine 3 columns and find possible combinations
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Jetblue
5 - Atom
‎07-13-2022
11:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I need to create a category list in one column.
Each column / category is listed as True or False ( I have 3 categories)
Some rows could be True for all 3 categories, while some could be only one category or neither. I was wondering if I could create a combination for each. See example below, the column for "new category" is the results I am trying to get.
RED | Yellow | Green | New category | |||
False | False | False | Neither | |||
True | False | False | RED | |||
True | True | False | REDYELLOW | |||
True | True | True | ALL | |||
Labels:
- Labels:
- Data Investigation
- Workflow
2 REPLIES 2
17 - Castor
‎07-13-2022
11:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Jetblue
Here's how I would do this. I chose not to do the long if statement approach and instead tranpose the data to check for true values in each record and apply the logic from there. This would work for any number of columns.
flying008
15 - Aurora
‎07-13-2022
06:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,@Jetblue
The other way to dynamic resolve with simple formula.
IF IsEmpty(ReplaceChar([New category], "-,","")) THEN 'Neither'
ELSEIF Right([New category], 1)='-' THEN ReplaceChar([New category], "-,","")
ELSE 'ALL' ENDIF
