Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Replicate IF(COUNTIFS) Excel Formula

juannc11
5 - Atom

Good afternoon,

 

I'm having trouble replicating the following Excel formula my workflow:

 

=IF(COUNTIFS($A$2:A2,A2,$G$2:G2,G2)>1,0,1)

 

Column A is an employee ID and column G is a team ID. Since there are duplicate Employee IDs I use the formula to count the first instance that an Employee ID pops up given that the Emp ID and Team ID are the same. I am feeding this data to a Pivot Table. The formula allows me to set the Pivot Table to count for the first instance of the ID while keeping the duplicate IDs when drilling down into the data. I'm keeping the duplicate ID's because the rows show different sub categories that an employee may be supporting within one team. 

 

Example:

 

EMP IDTeam IDUniqueValCount (IF(COUNTIFS) Formula)
251a aa 1
251aaa
251aaa0
251abb1
252acc1
253acc1

 

Using the Summarize Tool doesn't allow me to assign 0's to the duplicate values after the first instance.

 

Any help is much appreciated! 

4 REPLIES 4
kelsey_kincaid
12 - Quasar

Hi @juannc11 ,

This sounds like a good use case for the Multi-Row Formula tool. Give this a try and let me know if it works for your use case!

 

kayers_0-1607376948807.png

 

Qiu
21 - Polaris
21 - Polaris

@juannc11 

Maybe something like this would help.

1208-juannc11.PNG

Qiu
21 - Polaris
21 - Polaris

@juannc11 
If you find my workflow useful, appreciate you would mark it as accept as well.

Qiu
21 - Polaris
21 - Polaris

@juannc11 
Thank you so much😁

Labels