Alteryx Designer Desktop Discussions

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

Daily Movement Calculation

akumar2609
8 - Asteroid

Hi All,

 

I need help in the fixing one of my problem in calculation. Below is my Data set.

 

Accc NoAmountDaysAccc NoAmountDays
1212100Previous Day1212200Current Days
1313200Previous Day1313100Current Days
1414300Previous Day1414250Current Days
1515400Previous Day1515500Current Days
   1871400Current Days
   2341230Current Days

 

My requirement is to calculate the daily movement (Previous day-Current Day) Where there are new accounts, on current date, Daily Movement column should give me the current amount only (see below)

 

Accc NoAmountDaysAccc NoAmountDaysDaily Movement
1212100Previous Day1212200Current Days-100
1313200Previous Day1313100Current Days100
1414300Previous Day1414250Current Days50
1515400Previous Day1515500Current Days-100
   1871400Current Days400
   2341230Current Days230
2 REPLIES 2
cjaneczko
13 - Pulsar

Try this. Included Record ID just to make sure its in the right order, might not be needed. The Select tool changes the Amount columns to Double. It may already be Double in your workflow so its possible its not needed. The First formula converts Null values to 0 in the Amount column. Then the formula below that looks for any 0's and makes sure the Amount 2 is positive if there is no Amount 1. Otherwise it does the difference between Amount 1 and Amount 2. 

 

image.pngimage.pngimage.png

FinnCharlton
13 - Pulsar

Hi @akumar2609 , here's how I would do this:

image.png

Labels