We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Need to build logic at Row level data 1

Hi Experts,

 

Please find my requirement below.

 

IF mange value < 0 then "NA"

else if value > 0 and any Negative transaction in the next 3 months then "Used in 3 months" else "Unused in the next 3 months" .
 
Condition :1 We should see data for each user individually
 
For better understanding, please see the data below.
 
NameDateTransactionRequirementComments
Bird01-01-2022200Not used in 3 monthsNO Negative value in the next months
Bird10-05-2022-50NA 
Cool02-01-2022300used in 3 monthsNegative value before 3 months i.e., -30
Cool03-02-2022-30NA 
Cool03-03-2022500Not used in 3 monthsNo negative value in the next 3 months
Cool03-07-2022-100NA 
Rama02-03-20221000used in 3 monthsNegative value before 3 months i.e.,-50
Rama03-03-2022200used in 3 monthsNegative value before 3 months i.e.,-50
Rama03-05-2022-50NA 
Rama03-07-2022-100NA 
Rama03-10-202210Not used in 3 monthsNo negative value in the next 3 months
Rama03-11-2023-20NA 
Main01-01-20205000Not used in 3 monthsNo negative value in the next 3 months
Main01-02-2020100Not used in 3 monthsNo negative value in the next 3 months
Main02-05-2021-50NA 
Main02-07-2021-100NA 
Main02-02-2022-500NA 
Main02-03-2022-50NA 
Main02-04-2023400Not used in 3 monthsNo negative value in the next 3 months

 

Any suggestions is greatly appreciated.

 

Thanks

2 REPLIES 2
geraldo
13 - Pulsar

@ChallaSreenivasula 

 

an workflow example

I have given the Output as well as in the "Requirement" column.

 

Basically there are few conditions:

1. If Transaction amount <= 0 then "NA"

2. If Transaction amount >0 and for every positive value we need to search for negative value for the same name range and check if the date diff between 2 dates <3 months then "USED in 3 months" else "Unused within 3 months"

or 3.If transaction amount >0 and no negative values for that name range or have a negative value but the date diff between two dates is > 3months then "Unused in 3 months"

 

I hope you will get a better clarity now, please check the data below for your reference.

 

Bird01-01-2022200Not used in 3 monthsNO Negative value in the next months
Bird10-05-2022-50NA

 

 

Cool02-01-2022300used in 3 monthsNegative value before 3 months i.e., -30
Cool03-02-2022-30NA 
Cool03-03-2022500Not used in 3 monthsNo negative value in the next 3 months
Cool03-07-2022-100NA

 

 

Rama02-03-20221000used in 3 monthsNegative value before 3 months i.e.,-50
Rama03-03-2022200used in 3 monthsNegative value before 3 months i.e.,-50
Rama03-05-2022-50NA 
Rama03-07-2022-100NA 
Rama03-10-202210Not used in 3 monthsNo negative value in the next 3 months
Rama03-11-2023-20NA 

 

Main01-01-20205000Not used in 3 monthsNo negative value in the next 3 months
Main01-02-2020100Not used in 3 monthsNo negative value in the next 3 months
Main02-05-2021-50NA 
Main02-07-2021-100NA 
Main02-02-2022-500NA 
Main02-03-2022-50NA 
Main02-04-2023400Not used in 3 monthsNo negative value in the next 3 months
Labels
Top Solution Authors