ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
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