Alteryx Designer Desktop Discussions

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

How to display the sum of a calculation based on multiple rows

Cela
8 - Asteroid

Hey guys,

 

I am trying to calculate cell values of different rows (e.g. B12 + C1) but I think the issue is that it doesn't know where to write the resulting value. It works perfectly fine as long as I am using the same row but it doesn't show the result once it's different rows.

 

Thank you for your advice in advance!

12 REPLIES 12
FrederikE
13 - Pulsar

@Cela, What exactly do you mean - what is "it", Also what are you referring to with B12 and C1, cells like in Excel? - Alteryx doesn't function that way. Which Tool do you use?

In Alteryx formulas can only work on row level, unless you use special tools like the Mutli-Row tool. 

Cela
8 - Asteroid

@FrederikE Thanks for the quick response! I am basically using the Multi-Row-Formula Tool to calculate with values of two rows in the same column. The values are numeric so I already considered to set that column to a numeric type.

The calculation itself is easy: I refer to a specific value in Column A to grab the value of Column B in the same row and do the same thing for e.g. the row below that one. The result is displayed as long as the calculation refers to values of the same row but gets confused as soon as I refer to values of different rows.

cjaneczko
13 - Pulsar

Can you screenshot an example? B12 and C1 are not in the same row or column, those are two references that don't share anything in common. 

Cela
8 - Asteroid

 @cjaneczko I can see how this might be confusing, sorry about that. It was merely an example, but my case involves simply numbers written under one another.

 

Basically:

 

Column A     Column B

Text 1            123,456

Text 2            789,012

 

And as I said, I grab those numbers by referring to Column A first and picking those numbers next.

cjaneczko
13 - Pulsar

The summarization tool can do this. Group by Column A and sum Column B. 

Cela
8 - Asteroid

Cela_0-1684931251272.png

Here's a screenshot of the table and the output after using  Multi-Field-Row trying to calculate with both rows

 

Cela_1-1684931328224.png

That's what it shows once I refer to one row only (subtracted the value from itself so that it results in 0)

cjaneczko
13 - Pulsar

Here is the output.

 

cjaneczko_2-1684931407116.png

 

cjaneczko_0-1684931365415.png

cjaneczko_1-1684931378654.png

 

Cela
8 - Asteroid

@cjaneczko Thank you for the recommendation! I'm afraid that this won't cut it since I have multiple rows in the original input that are not supposed to be calculated as a whole. It requires me to calculate specific rows instead of the entire column.

cjaneczko
13 - Pulsar

The only other way I can think of this is create a filter and filter the rows you want to total. Sum them up with the summarize tool and then union them back into the original sheet. Say you dont want Text 3 Summarized, then create a filter than filters Text 3 out. Then summarize Text 1 and Text 2. Once those are summed Union the false side of the filter with the True side of the filter to bring them back together summed up. 

Labels