We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Summing Rows & Adding New Row with Calculation

AlteryxLearner23
7 - Meteor

Hi,

 

I'm trying to create something using the attached file.

As you can see, I currently have a monthly view from "Jan 23" all the way to "Sep 28". On the end I have a yearly split.

 

Currently, the yearly columns on the far right are populated correctly, as it is adding up the respective months data for each year.

So, 2023 is Jan23 + Feb23 + Mar23 + Apr23 etc etc

 

How can I follow this same format for the second row? The second row is not populating the same way for the yearly split on the end.

 

Additionally, I want to create a third row called "Calculation" which adds up the sum of rows 1 & 2 for every column.

 

It will look something like this in the end:

 

Forecast Type                    2023      2024      2025      2026      2027      2028
Level Expense (F)             51103    10000    15000       0            0             0
Payments                          -18852   -5000     -2000        0            0            0
Calculation                        32251     5000      13000       0            0           0

 

5 REPLIES 5
ShankerV
17 - Castor

Hi @AlteryxLearner23 

 

One way of doing this.

 

ShankerV_0-1685530205904.png

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @AlteryxLearner23 

 

Step 1: Input

 

ShankerV_0-1685530262162.png

 

 

Step 2: 

 

ShankerV_1-1685530280144.png

 

ShankerV_2-1685530295844.png

 

 

Step 3:

 

ShankerV_3-1685530315571.png

 

ShankerV_4-1685530325231.png

 

Step 4:

 

ShankerV_5-1685530353714.png

ShankerV_6-1685530365410.png

 

 

 

Step 5:

 

ShankerV_7-1685530379616.png

 

ShankerV_8-1685530392269.png

 

ShankerV_9-1685530407354.png

 

 

Many thanks

Shanker V

AlteryxLearner23
7 - Meteor

Thanks, this works well!

 

Out of interest, I tried to add in two new columns into the input and I received the attached output file.

 

How do I remove the word 'Total' from the first two columns and just keep it in the 'Forecast Type' column?

ShankerV
17 - Castor

Hi @AlteryxLearner23 

 

One way of doing this.

 

ShankerV_0-1685553493148.png

 

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @AlteryxLearner23 

 

Step 1: Input data

 

ShankerV_0-1685554795323.png

 

 

Step 2: 

 

ShankerV_1-1685554829877.png

IF [ID]="Total"
THEN null()
ELSE [ID]
ENDIF

 

ShankerV_2-1685554847311.png

 

 

Many thanks

Shanker V

Labels
Top Solution Authors