Hello Everyone,
I am trying to add multiple rows from multiple columns I need to place each total in a different column.
I need to add column $ 4 w/e 01/25/20 to column $ 4 w/e 02/22/20 then in another column I need the sum for columns $ 4 w/e 02/22/20 and $ 4 w/e 03/21/20, so on and so forth.
I am getting a parse error and I also need to figure out how to create the new columns.
Thank you!!
Hi @Fescobar ,
The parsing error is because you are trying to add two different expressions inside a single formula. The formula tool allows you to edit a pre-existing column or create a new one in a single expression box, but it does not allow you to create more.
Also, I see you want to add two columns together, and then keep adding those columns in pairs of two. Do you think that doing that in different columns is the best way forward? I mean you would have to manually create an column for each aggregation and surely doing that in columns is not the best way.
What are you trying to achieve? Maybe we can find a more dynamic way of doing things
Cheers,
Angelos
Thank you .@AngelosPachis the reply and input is greatly appreciated.
So the requirements changed, I need to sum the latest two 4 week columns, then the latest 8 week, so on...
In order words, I don't need to keep adding multiple columns of each week. Does this make more sense?
Thanks again!!
Slightly more sense indeed @Fescobar ,
I've transposed those columns so we have them in a thin and long format ; Alteryx makes it easier to add rows than adding columns
Below I attach a screenshot of the different column names in your dataset that I presume we must sum.
Can you please help me understand what the name of each field stands for (that may help) or which columns you need to add up?
Cheers,
Angelos
Thank you for the reply once again and the feedback.
I can't share the details before the columns I need added; however, I can tell you that they are adult beverage products from various suppliers from around the world. The data under the dates are sales numbers on the number of weeks ending on the date stated, so for example sales number for the product listed on the row for the 4 weeks ending on 12/26/20. I need to add the rows for each of the last set of dates for the year.
The first one being the last two sets of 4 weeks in 2020.
$ 4 w/e 12/26/20 + $ 4 w/e 11/28/20
I then have add the last two sets of 8 weeks, then the last 12, followed by 24, and lastly the full 52 weeks.
I figured that I could get assistance on the first formula, I can figure out the remaining ones.
Thank you once again!
Your support is greatly appreciated.
Fausto
Hi @Fescobar ,
Your answer helps a bit but I think I need some more help.
So the first thing to do is add the weeks for "4 w/e 12/26/20" and "4 w/e 11/28/20". Then you would have a result which is 8 weeks of data.
Then, what do you want to do? Do you want to add those 8 weeks with "4 w/e 10/31/20"
OR
you want to first add "4 w/e 10/31/20" to "4 w/e 10/03/20" and hence get 8 weeks of data, and then add them up to the 8 weeks you have estimated in the previous step.
That is what I'm trying to figure out.
Thanks,
Angelos
You're a saint .@AngelosPachis, thank you.
If you take a look at the formula I've come up with I tried to use "+" in it thinking that it would add the values; however, it's combining them. I am looking to get the sum and place the sum for each row in the same row, but in the new column. This would give me, 8 week ending, 12, week ending, 24 week ending...
Thanks again!
Fausto
Hi Fausto( @Fescobar )
Is this what you are after?
I created the running totals only for the columns having a header starting with $ 4 w/e, because those are the only columns we have mentioned so far in this post and I wasn't sure what the other mean.
Is this what you are after? Let me know please if that works for you or you have any questions on the workflow.
Cheers,
Angelos
I'm sorry it's taken me a while to reply, but I needed to get this out...so I resorted to doing the work in Excel.
This is a quick explanation to what the columns mean.
$ # WE MM/DD/YY = Sales Week Ending Month/Date/Year
$ % Chg YA # WE MM/DD/YY = Sales Percent Change Week Ending Month/Date/Year
9L EQ # w/e MM/DD/YY = 9 Liter Equivalent Sales Week Ending Month/Date/Year
9L EQ % Chg YA # w/e M/DD/YY = 9 Liter Equivalent Sales Percent Change Week Ending Month/Date/Year
Avg Unit Price # w/e M/DD/YY = Average Unit Price Week Ending Month/Date/Year
Avg Unit Price % Chg YA # WE w/e M/DD/YY = Average Unit Price Percent Change Week Ending Month/Date/Year
The attached file has the work I did in Excel and I would like to be able to replicate this in Alteryx because I already have a formula that combines two different sheets.