Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to create a countifs base on two or more criterias(columns)

icchung
7 - Meteor

 

Hi all,

 

I appreciate any help or suggestions to this Alteryx workflow.

In the my excel I have COUNTIFS COLUMN [=COUNTIFS(A:A,A2,B:B,B2)] to identify the same Company & Region. Is this possible to do in Alteryx. The ERROR in my current workflow it's duplicating the rows when I join back the details "xxx" from the count "E" node.

 

 

CompanyRegionCOUNTIFSDivisionStageTypeCategoryDatePrimary OP ContactInitial Engagement ContactAdditional Information and Comments
XYZ1EMEA1UKIxxxxxxxxxxxx xxx xxx xxx
XYZ2NORAM1US Centralxxxxxxxxxxxx xxx xxxxxx
XYZ3NORAM1US Westxxxxxxxxxxxx xxx xxx xxx
XYZ4NORAM1US Eastxxxxxxxxx xxx xxx xxx xxx
XYZ5APAC1Indiaxxxxxxxxx xxx xxx xxxxxx
XYZ6NORAM2US Eastxxxxxxxxx xxx xxx xxx xxx
XYZ6NORAM2US Eastxxxxxxxxx xxx xxx xxx xxx
XYZ7EMEA2UKIxxxxxxxxx xxx xxx xxx xxx
XYZ7EMEA2UKIxxxxxxxxx xxx xxx xxx xxx
2 REPLIES 2
apathetichell
20 - Arcturus

yes. It's actually quite easy. You just use group by two categories and a count field. Having said that your join configuration is off. You should really be using a regular join - not a join multiple. and when you are joining a non-unique identifier in one of your join sets it will join n times where n is the times the non-unique identifier occurs for each non-unique identifier. In your case - Alteryx has no idea which Johnson & Johnson should join to which Johnson & Johnson - so it joins them all. You can fix this by joining on multiple columns...

icchung
7 - Meteor

Thanks for helping out.

It is showing me duplicated rows when there should be only 6 rows.

icchung_5-1638421187791.png

 


It should be showing the record that has a different status (highlighted)

icchung_4-1638421087562.png

 

in the excel the countifs is only base on Company and region but it doesn't see the case with alteryx countifs

 



Labels
Top Solution Authors