Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Need help with the Formula tool

robinmatthew
5 - Atom

Hi all,

 

I am looking to run a workflow for my office that is calculating the number of days a request has been in the queue. I am stuck at this formula where I want to categorize the requests by ageing and give them a Red Amber Green rating. The formula goes like this:

 

IF [Age Group] = '0-2 days' OR [Age Group] = '2-5 days' && [Count] <15 OR [Age Group] = '>5 days' && [Count] = 0 THEN 'Green' 
ELSEIF 
[Age Group] = '2-5 days' && [Count] >=15 && [Count] <=50 OR [Age Group] = '>5 days' && [Count] <=10 THEN 'Amber'
ELSEIF
[Age Group] = '>5 days' && [Count] >10 OR [Age Group] = '2-5 days' && [Count] >50 then 'Red'

 

Whenever I am running this formula, I am getting 'null' values.

image.png

1 REPLY 1
Bren_Spill
12 - Quasar

@robinmatthew - try this

 

IF ([Age Group] = '0-2 days' OR [Age Group] = '2-5 days' && [Count] <15) OR ([Age Group] = '>5 days' && [Count] = 0) THEN 'Green'
ELSEIF
([Age Group] = '2-5 days' && [Count] >=15 && [Count] <=50) OR ([Age Group] = '>5 days' && [Count] <=10) THEN 'Amber'
ELSEIF
([Age Group] = '>5 days' && [Count] >10) OR ([Age Group] = '2-5 days' && [Count] >50) then 'Red' else "CHECK" endif

 

Workflow also attached for your reference. If this solves your issue, please mark as solution. Thanks!

Labels