Alteryx Designer Desktop Discussions

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

Simple SUM() in Alteryx

karla_camacho
6 - Meteoroid

Hello comunity!

 

I want to re apply this Excel formula in Alteryx:

karla_camacho_0-1664414091968.png

As you can see in the formula bar, I need to do this: SUM(D17:D27) in cell E22, and in E24 it will be SUM(D18:D28) and so on and so on. In Excel is easy because I just need to drop down the formula and it changes accordingly (updating the cell values).

 

How can I reapply this in Alteryx? Is a column with a lot of rows, so I need a solution that I can reapply, not just for a couple of scenarios.

 

Thanks!

8 REPLIES 8
AdwaitTarudkar
8 - Asteroid

Hi 

 

Have you tried Multi-Row Formula tool?

karla_camacho
6 - Meteoroid

Yes, but I have to do something like this: 

karla_camacho_0-1664415005899.png

And they are a lot of columns for me to insert 1 by 1.

 

AdwaitTarudkar
8 - Asteroid

Hi 

 

But is that giving you desired outcome after completing the expression?

 

I am not sure of other ways of doing this. Somebody else might be able to help.

karla_camacho
6 - Meteoroid

No, it´s not working. And for other columns I have to do it for up to 100 rows

AdwaitTarudkar
8 - Asteroid

Hi

 

I guess the constant value might be causing the issue.

 

I am looking for another workaround meanwhile. I'll let you know if I come across something.

AdwaitTarudkar
8 - Asteroid

Hi 

 

1. Try and create a column for the constant value ( in your case- $C$10)

 

2. A good workaround would be using running total tool first on the target column and then apply multiple-row formula tool to achieve SUMA(D17:D27)  (This way you can get rid of adding multiple rows manually) = [Row+6:RunTot_demand]- [Row-6:RunTot_demand]

 

3. Apply 2nd multiple-row tool to achieve the numerator of the formula i.e. D16+D28+ 2* SUMA(D17:D27) 

 

4. Apply the basic formula tool to achieve D16+D28+ 2* SUMA(D17:D27) / (2 * $C$10)

 

Hope this helps!

 

 

binuacs
20 - Arcturus

@karla_camacho This can be achieved in different ways. If you can provide a sample input data and expected output in an excel file someone can help you with this.

Christina_H
14 - Magnetar

I agree with @AdwaitTarudkar that a running total is the way to go.  After generating a running total on your Demanda column, I've used this formula which I think matches yours:

(2*([Row+5:RunTot_Demanda]-[Row-6:RunTot_Demanda])+[Row+6:Demanda]+[Row-6:Demanda])/24

 

The exception is the value in C10.  Working backwards from the one value I can see the data for I think it's 12, hence the /24 at the end (2*12).  If you could append this value from a separate input so it's on every row it would be easy to incorporate in the formula.

Labels