Hi Alteryx Community,
I have a historical data set.
A | B | C |
3434 | 3434 | 67 |
565 | 33 | 565 |
234 | 234 | 56 |
3434 | 3434 | 3434 |
34 | 34 | 45 |
23 | 435 | 23 |
23 | 56 | 45 |
23 | 56456 | 45 |
23 | 23 | 23 |
23 | 45 | 56 |
Each day I get a new data set.
A | B | C |
3424 | 334 | 617 |
I would like to append this data set to the historical data set.
Then calculate changes between rows and also % change between rows.
A is current row
A-1 is previous row.
Same for B and C.
A | B | C | A - (A-1) | (A-(A-1)) / (A-1) | B - (B-1) | (B-(B-1) / (B-1) | C - (C-1) | (C - (C-3))/(C-3) | |
3434 | 3434 | 67 | #VALUE! | #VALUE! | #VALUE! | #VALUE! | ####### | #VALUE! | |
565 | 33 | 565 | -2869 | -0.835468841 | -3401 | -0.990390215 | 498 | #DIV/0! | |
234 | 234 | 56 | -331 | -0.585840708 | 201 | 6.090909091 | -509 | #VALUE! | |
3434 | 3434 | 3434 | 3200 | 13.67521368 | 3200 | 13.67521368 | 3378 | 50.41791045 | |
34 | 34 | 45 | -3400 | -0.99009901 | -3400 | -0.99009901 | -3389 | -5.998230088 | |
23 | 435 | 23 | -11 | -0.323529412 | 401 | 11.79411765 | -22 | -0.392857143 | |
23 | 56 | 45 | 0 | 0 | -379 | -0.871264368 | 22 | 0.006406523 | |
23 | 56456 | 45 | 0 | 0 | 56400 | 1007.142857 | 0 | 0 | |
23 | 23 | 23 | 0 | 0 | -56433 | -0.999592603 | -22 | -0.956521739 | |
23 | 45 | 56 | 0 | 0 | 22 | 0.956521739 | 33 | 0.733333333 |
I would like to append the new data set to the first 3 rows and calculate the rest of the columns for daily change and % change.
Please help I am stuck, thank you so much.
Hi, @ericren
Kindly consider the below.
I hope you find it helpful - Cheers!
Please note divide by zero and zero divided by num are different mathematical outcomes😎
IF [RecordID] =1 THEN Null()
ELSEIF IsEmpty([Row-1:A]) THEN Null()
ELSEIF [Row-1:A] =0 THEN Null()
ELSEIF [Diff_A] =0 THEN 0
ELSE [Diff_A]/[Row-1:A]*100
ENDIF
or something like that...
It is giving me an error for me to import it. It is a newer version. :(