Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Calculating Running Difference Total (Row:ColA - Row-1:ColC) till it is positive

Tej_Singh
8 - Asteroid

Hi Team

I hope you all are doing good!

 

I am stuck somewhere and need your help.

 

I wish to achieve a kind of calculating Running Difference Total (Row:ColA - Row-1:ColC) till the time the result of  this difference (Row:ColA - Row-1:ColC) is positive.

 

Sample data attached which has formulas in excel with which I have achieved it. Please advise how can we achieve this in Alteryx Designer?

1 REPLY 1
AngelosPachis
16 - Nebula

Hi @Tej_Singh ,

 

Can you try this expression in your multi-row formula tool please?

IF ISNULL([Row-1:BUY]) THEN [BUY]-[DIFF]
ELSEIF [Row-1:Buy-Diff]<0 THEN [BUY]-ABS([Row-1:Buy-Diff])
ELSE [BUY] 
ENDIF

 

AngelosPachis_1-1661840700249.png

 

Hope that helps,

Angelos

Labels
Top Solution Authors