How to categorize a list column?
For example, I have 3 rows in my table, the column type is List and column name is [Purchase Status]:
1. {To Purchase, Purchase Complete}
2. {Purchase Complete, Purchase Complete}
3. {To Purchase, To Purchase}
To further categorize my [Purchase Status], I have tried using:
SWITCH(
ANY(UNIQUE(LIST([Purchase Status]))) = "To Purchase", "To Purchase",
ANY(UNIQUE(LIST([Purchase Status]))) = "Purchase Complete", "Purchase Complete",
"Partially Purchased"
)
But got the error:
Solved! Go to Solution.
If you want to check an item against a list, use IN() instead of '='.
https://help.appsheet.com/en/?q=In
Update: hit send too soon
Using IN() you can first check if "Purchase Complete" is in the list, if it is not, then the result will be "To Purchase". Then check if "To Purchase" is in the list, if it is not then the result is "Purchase Complete". Else the answer is "Partially Purchased"
If understanding of your requirement is correct, maybe you could try something like below
IFS(
AND(COUNT([Purchase Status])=2, NOT (IN("To Purchase",[Purchase Status]))), "Purchase Complete",
AND(COUNT([Purchase Status])=2, NOT (IN( "Purchase Complete",[Purchase Status]))), "To Purchase",
AND(COUNT([Purchase Status])=2, "Partially Purchased"
)
User | Count |
---|---|
35 | |
9 | |
3 | |
3 | |
2 |