Nested and multiple If else statements
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi All, I have a field denoting number of years as shown below and based on the value, I need to categorize as mentioned buckets as a new column. I tried standard if, if else statements and alteryx is giving me the malformed function cell error. Please can someone tell me the best way to categorize this ? Attached input and output col in file.
- <1 year
- 1-2 years
- 2-5 years
- 5-7 years
- 7-10 years
- 10-25 years
- >25 years
No of years |
(0.56) |
0.73 |
1.70 |
24.46 |
23.46 |
17.05 |
(0.56) |
4.45 |
6.96 |
13.45 |
18.33 |
17.05 |
4.45 |
24.46 |
17.05 |
1.10 |
17.05 |
24.46 |
23.46 |
24.46 |
23.46 |
24.46 |
Solved! Go to Solution.
- Labels:
- Preparation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @messi007 - I had tried this exact formula and so far so good, the syntax shows up well. The minute I finish typing "endif" , the formula shows an error. Please can you refer to screenshot one and two respectively and see what I am doing wrong?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @Mj9715 ,
This usually means that you have the field in the incorrect data type. For example, if you are trying in this case to apply a comparative between to values and one of them is a string, it doesn't make a sense for it. You need to transform them into a number field:
Regards
