Forum Discussion
Anonymous
5 years agoNot applicable
Combine rows from multiple columns into a new column
Hello everyone. I've got these two tables: FACT_STK STK_ID STK_ITM_ID STK_DATE STK_QTY STK_WHS 1 I0154 24 Apr 21 50 WHS1 2 I0154 26 Apr 21 30 WHS1 4 I0154 30 Apr 21 2...
CNENFRNL
Community Champion
5 years agoTweak the code according to your own dataset,
Anonymous
5 years agoNot applicable
Thank you so much, it worked! Do you know how can I calculate the average stock, intended as sum of (CORRECT_STK* numbero of days of stock) divided by (total days of stock)
In the example it would be (50*1 + 30*4 + 20*2 + 15*2) / 9 = 26,67 days
Thank you!