Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

SUMIFS Formula

timol
8 - Asteroid

Dear all,

 

I have the follwing type of data structure and would like to do a SUMIFS formula in Alteryx

 

Company EmployeesYearFounding
A320122013
A420132013
A520132013
A2320142013
A53520142013
A201820192013
A42420202013
A4320202013
A1320172013
A2420182013
A420142013
A620142013
A720192013
A420202013
A4520202013
A3420172013
A67620182013
B45420192015
B8620182015
B4620172015
B5320172015

 

I want to SUMIF (accumulate) the number of employees for every year

I want to show the timespan from Founding year until 2018

so e.g. for 2017 I want to sum up all values <= 2017

the minimum Year should be the Founding year and the maximum year should be 2020.

Can anyone help me implementing this in Alteryx?

9 REPLIES 9
AngelosPachis
16 - Nebula

Hi @timol ,

 

I'm not sure I fully understand the question, but hopefully I do. I have summed the values up if the [Year] is less than or equal to the [Founding Year] for each company and done the same for those years that are greater than the founding year. Then I union everything back.

 

AngelosPachis_0-1617172518577.png

Hope that helps, let me know if that's what you were looking for please (A desired output table always helps)

 

Cheers,

 

Angelos

timol
8 - Asteroid

Thank you!

 

I changed the input data a little bit since it made no sense (Employees before founding):

Company EmployeesYearFounding
A320132013
A420132013
A520132013
A2320142013
A53520142013
A201820192013
A42420202013
A4320202013
A1320172013
A2420182013
A420142013
A620142013
A720192013
A420202013
A4520202013
A3420172013
A67620182013
B45420192015
B8620182015
B4620172015
B5320172015

 

 

Please see a screenshot of the output and formula in excel below

timol_0-1617173253483.png

 

 

Thank you!

 

afv2688
16 - Nebula
16 - Nebula

Hello @timol ,

 

Here you go:

 

Untitled.png

afv2688_0-1617176900738.png

 

 

Regards

timol
8 - Asteroid

Thank you!!

 

Company EmployeesYearFounding
A320122013
A420132013
A520132013
A2320142013
A53520142013
A201820192013
A42420202013
A4320202013
A1320172013
A2420182013
A420142013
A620142013
A720192013
A420202013
A4520202013
A3420172013
A67620182013
B45420192015
B8620182015
B4620172015
B5320172015

 

How could I change the solution if I would have some data points where Year > Founding that I would still like to include?

So I would still like to count them but only show the time period "Founding" until 2018

afv2688
16 - Nebula
16 - Nebula

Hello @timol ,

 

You can add a filter to the end of the workflow to select the years

 

Untitled.png

 

Regards

timol
8 - Asteroid

Thanks!

 

But this solution would still not count the first data point right?

 

How could I change the solution if I would have some data points where Year > Founding that I would still like to include?

So the SUMIF formula should work regardless of the founding year but in the end only year equal or after the founding year should be displayed

afv2688
16 - Nebula
16 - Nebula

Hello @timol ,

 

Could you please explain it with an example? I don't understand what you mean.

 

Regards

timol
8 - Asteroid

Assume the following data structure (slightly changed compared to the one before)

 

Company EmployeesYearFounding
A320122013
A420132013
A520132013
A2320142013
A53520142013
A201820192013
A42420202013
A4320202013
A1320172013
A2420182013
A420142013
A620142013
A720192013
A420202013
A4520202013
A3420172013
A67620182013
B45420192015
B8620182015
B4620172015
B5320172015

 

 

This should be the output

timol_0-1617179966802.png

 

 

afv2688
16 - Nebula
16 - Nebula

Hello @timol ,

 

how about now?

 

Regards

Labels
Top Solution Authors