Free Trial

Alteryx Designer Desktop Discussions

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

Creation of Schedule - multiple conditional rule

SyedQD
6 - Meteoroid

Hi Team, 

 

I am looking to create a schedule with some rules in it i tried multi row formulae but not quite getting what i am looking for Seeking help to fix this 

I need the column calc to be calculated in such a way that for the very first row it will take the Amount from Amount column and will take percentage rate from rate col and will add the 1.5 % to the Amount value 

 

for first row will of each product will take the value from same Row Amount field but all the following rows will calculate the calc col based on the previous value of calc col instead of amount for all the following rows until the product change to B and same logic will be applied for product B , C .... onwards 

 

calc formula for row 1 of each product

Product A Row 1 

Calc =  Amount + Amount * Rate %

=  100 + 100 * 1.5 %  = 101.50

Product A row 2 onwards till Product get changed 

Calc = Calc + Calc * Rate % 

= 101.50 + 101.50 * 1.5% = 103.02

 

Attached is the workflow with data already loaded Kindly suggest a solution to handle these two scenarios this is doable in Alteryx .

 

SyedQD_0-1680737605438.png

 

 

 

 

2 REPLIES 2
SPetrie
13 - Pulsar

Using the Csv, I set the amt and rate values to be doubles and then used this mult-row formula and grouped it by Product.

if isnull([Row-1:NewCalc]) then [Amount]+([Amount]*[rate]/100) else [Row-1:NewCalc]+([Row-1:NewCalc]*[rate]/100) endif

 

SPetrie_1-1680820218013.png

 

SyedQD
6 - Meteoroid

Thanks a lot  worked ! i missed selecting Null in the previous attempts 

Labels
Top Solution Authors