This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- Discussions
- Promote Discussions
- Re: Why Doesnt this work?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

jjdenha

5 - Atom

2 weeks ago

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

IF [Length of Service1] <= 90 THEN '0-3 Months' elseif [Length of Service1] > 90 and [Length of Service1] <=180 THEN '3-6 Months' ELSEif [Length of Service1]> 180 and [Length of Service1] <= 365 then '6-12 Months' elseif [Length of Service1] >365 and [Length of Service1] <= 1095 then '1-3 Years' else if [Length of Service1] >1095 and [Length of Service1] <= 2190 then '3-5 Years' elseif [Length of Service1] >2190 and [Length of Service1] <= 3650 then '5-10 Years' elseif [Length of Service1] > 3650 and [Length of Service1] <= 5475 then '10-15 Years' else '15+ Years' ENDIF

Labels:

Highlighted

DavidP

14 - Magnetar

2 weeks ago

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

Problem highlighted in blue - remove the space.

Highlighted

jjdenha

5 - Atom

2 weeks ago

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

Why is it returning a Null?

Highlighted
@jjdenha - can you modify the [Length of Service 1] fields datatype to DOUBLE and test? If you still get a null, could you share a screenshot of the [Length of Service 1] field which is causing the null?

AbhilashR

Alteryx Certified Partner

2 weeks ago

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

Highlighted

jjdenha

5 - Atom

2 weeks ago

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

Screen shot is above

Highlighted

AbhilashR

Alteryx Certified Partner

2 weeks ago

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

@jjdenha - screenshot didnt come through. Can you upload it again?

Highlighted

jjdenha

5 - Atom

2 weeks ago

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

I did away with the 'and' and just used < for all of them problem solved

tonyp

9 - Comet

2 weeks ago

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

I was going to suggest just a simple less than each time instead of (greater than x and less than y).

The formula runs from left to right, so if the first test is matched, the formula can stop processing. This means if LoS is <=90 it stops at the first test, Alteryx __doesn't__ go on to test if it is ALSO less than 180.

If it isn't <=90, but it happens to be <=180 that condition wins then the formula doesn't move any further, and so on until the first occurrence of a test being passed, or the final else if none are passed.

Labels