Alteryx Designer Desktop Discussions

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

Countifs in Alteryx

concel
6 - Meteoroid

Hello,

I have below table

 

Company 11
Company 20
Company 12
Company 33
Company 14
Company 31
....

 

I like to display in Alteryx in below format with one record for each company. In excel I can use countifs,  =COUNTIFS(A:A,C2,B:B,4) for each column

 

How can I achieve the similar in Alteryx. Any help is appreciated.

 

 Count of 1Count of 2Count of 3Count of 4
Company 1xxxx
Company 2xxxx
Company 3xxxx
6 REPLIES 6
flying008
14 - Magnetar

Hi, @concel 

 

Maybe this is your want ?

 

Input   Output     
          
NameValue  NameConcat_0Concat_1Concat_2Concat_3Concat_4
Company 11  Company 1 11 1
Company 20  Company 21   2
Company 12  Company 3 111 
Company 33        
Company 14        
Company 31        
Company 32        
Company 24        
Company 24        

 

Multi-Field Formula:

 

iif(isempty(trim([_CurrentField_],",")) ,Null(),CountWords(trim([_CurrentField_],","))-1)

 

 

录制_2022_09_17_12_10_25_806.gif

 

*******

If it can help you, please mark it as a solution for help share more.

concel
6 - Meteoroid

Hi @flying008,

Not sure how I can set the individual tools to work as you show.

And I have thousands of companies to run this for.

Not sure how I can use your method for this many companies.

concel
6 - Meteoroid

Here is the input and the output I desire.

Emmanuel_G
13 - Pulsar

Hi @concel ,

 

Find attached the way to do this easily.

 

Let me know if there is any issue and do not hesitate to mark as solution if it helped.

 

Emmanuel_G_0-1663444615825.png

 

flying008
14 - Magnetar

Hi, @concel 

 

As your input data from xlsx, like this flow:

 

录制_2022_09_19_09_00_09_864.gif

 

***********

Finally, I optimized the original process with @Emmanuel_G  so that the entire workflow can be fully automated. No matter the number and name of your field columns change, there is no need to manually adjust or write formulas.

 

录制_2022_09_19_09_53_42_452.gif

concel
6 - Meteoroid

Hi @Emmanuel_G , @flying008 

Thank you very much!

I was able to find a solution. But your suggested solution is much neater.

I appreciate it!

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels