Alteryx Designer Desktop Discussions

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

Off-set Amount Based on Rules

BRRLL99
11 - Bolide

Hi ,

 

I have following data set

 

RowDEAL TYPECUSTOMER - IDAMOUNT
17100A100
2CA100A-100
3CA100A100
401705996891.8
5017059-96887.65
6047059-851.5
7047059-4.15
80470594.15
9777059851.5
10887059-4.15
1199200A200
1239200A-200
1339200A200
1499200A200
1599400A-200
1639400A-200

 

Rules : for Expected output

1. Deal type should not be same and Amount should be "+" and "-" then it is Match
ex:  row 1 and 2 deal type is different and amount 100 is positive and negative then it is Match

2. Based on customer id sum of different Amounts needs to be offset with remaining amount.

ex: from row 4 to 10 we have same customer id's 851.5  is offset with -851.5 with different deal type same for 4.15

for -96887.65 it will be sum of row 5 and row 7 within same id

 

Expected output:

 

RowDEAL TYPECUSTOMER - IDAMOUNT 
17100A100M
2CA100A-100M
3CA100A100 
401705996891.8M
5017059-96887.65M
6047059-851.5M
7047059-4.15M
80470594.15M
9777059851.5M
10887059-4.15m
1199200A200M
1239200A-200M
1339200A200M
1499200A200M
1599400A-200M
1639400A-200M

 

1 REPLY 1
Labels