In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

General Discussions

Discuss any topics that are not product-specific here.
SOLVED

Ranged Formula tool issue

Madzy
7 - Meteor

Hey I am having an issue with my formula tool regarding on doing a ranged formula. 

IF [Days] >= "0" AND [Days] < "30" THEN
"0 - 30 Days"
elseif [Days] >= "30" AND [Days] < "60" THEN
"30 - 60 Days"
elseif [Days] >= "60" AND [Days] < "90" THEN
"60 - 90 Days"
elseif [Days] >= "90" THEN
"Greater 90 Days"
else Null()
endif

This is y formula but it is spouting out 

Madzy_1-1682948334132.png

Where I want those to be > 90 days. Any suggestions? 

BTW The days columns is being generated by a formula --> DateTimeDiff(DateTimeToday(),[Invoice Date],'days')

1 REPLY 1
DataNath
17 - Castor
17 - Castor

Hey @Madzy, the issue here lies with using the wrong data types. When making your [Days] field, make sure it's numeric (options in the dropdown):

 

DataNath_0-1682948757918.png

 

Then, for your [>= Days] field, write this without the quotes around the numbers:

 

IF [Days] >= 0 AND [Days] < 30 THEN
"0 - 30 Days"
elseif [Days] >= 30 AND [Days] < 60 THEN
"30 - 60 Days"
elseif [Days] >= 60 AND [Days] < 90 THEN
"60 - 90 Days"
elseif [Days] >= 90 THEN
"Greater 90 Days"
else Null()
endif

 

DataNath_1-1682948828677.png

Labels
Top Solution Authors