Alteryx Designer Desktop Discussions

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

COUNTIFS

timol
Asteroide

Dear all

 

I have the following data structure

Company Year1Year2
A20182015
A20182015
A20182016
A20182016
A20182016
A20182018
A20182018
A20182018
A2018

2018

 

Now I want Alteryx to give out a count for each year 2015-2020

But it should only count of Year 2 os lower of equal to Year1

So that would be the output

CompanyYearCount
A20150
A20160
A20170
A2018

9

 

Can anyone help me doing this in Alteryx?

 

13 RESPUESTAS 13
timol
Asteroide

Thank you so much for all your help!!!!

 

But isn't it the case that the condition is true for the first 11 rows?

afv2688
16 - Nebula
16 - Nebula

Hello @timol ,

 

The condition is not true for the first 11 rows. Row 10 and 11 have both year1 = 2017 and year2 2017 and 2018.

 

Since you stipulated that year2 has to be equal or lower it cannot be the case for row 11.

 

Company Year1Year2Founding
A201820152013
A201820152013
A201820162013
A201820162013
A201820162013
A201820182013
A201820182013
A201820182013
A201820182013
A201720172013
A201720182013
A201920152013
A201920172013
A201920192013
A201920122013
A201920112013
A201920072013
B201620112015
B201620112015
B201620152015
B20162015

2015

 

Regards

timol
Asteroide

You are absolutely right

 

Sorry for the confusion!

 

The output I would like to generate looks like this:

 

Company YearCount
A20130
A20140
A20150
A20160
A20171
A201811
B20150
B20164
B20174
B20184

 

 

I created the following excel sheet:

 

timol_0-1617077681445.png

In Cell H2 you can see the formula I used:

=+COUNTIFS($A$1:$A$22;F2;$B$1:$B$22;"<="&G2;$C$1:$C$22;"<="&G2)

 

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

 

That is what I actually want to rebuild in Alteryx. Is there any way to do this?

 

Thank you so much for your help!

 

afv2688
16 - Nebula
16 - Nebula

Here you go,

 

max year had to be a manual input since there is no data associated to it.

 

Untitled.png

 

Regards

Etiquetas