Alteryx Designer Desktop Discussions

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

Countif function

Jenina
8 - Asteroid

Hello All,

 

I am trying to do a simple countif in Alteryx but it looks like it's not straightforward. 

I just wanted to count the currencies per Account unit. Please see below sample. Thanks for the help.

 

Source:

Account unitCurrency
UNIT 113EUR
UNIT 113EUR
UNIT 113EUR
UNIT 113USD
UNIT 113USD
UNIT 112EUR
UNIT 112EUR
UNIT 112USD
UNIT 112USD
UNIT 112USD

 

Output:

Row LabelsA AccountB AccountGrand TotalItem Count
EUR-165522.27192850.6727328.4 
unit 11331652.24 31652.243
unit 112-65.64-0.01-65.652
USD-165522.27192850.6727328.4 
unit 11331652.24 31652.242
unit 112-65.64-0.01-65.653
14 REPLIES 14
geraldo
13 - Pulsar

@Jenina 

 


use the summarize tool group by Account unit Currency and count Currency

Jenina
8 - Asteroid

@geraldo  sorry, forgot to mention I also need to consider the A account and B account criteria,  I need the total count of currency per account unti existing in both A and B accounts. That's where I am having issues. 

apathetichell
19 - Altair

You can do that all in the summarize tool. group by both fields. count of either fields. sum of your sum columns.

Jenina
8 - Asteroid

@apathetichell  do you have a sample workflow? source below. What I am getting is the total per GL account, when I tried to sum it is not getting the correct count.

 

Account unitCurrencyGL Account
UNIT 113EURA Account
UNIT 113EURB Account
UNIT 113EURB Account
UNIT 113USDA Account
UNIT 113USDB Account
UNIT 112EURA Account
UNIT 112EURB Account
UNIT 112USDA Account
UNIT 112USDB Account
UNIT 112USDA Account
apathetichell
19 - Altair

post some sample data -and I can mock something up. - this sounds like you need to group by an additional field. - you will need to do two different breakdowns and some kind of join. Having two different sub total types (by currency and by account - at least in the format you have) would require some pivots/joining.

Jenina
8 - Asteroid

@apathetichell  I attached a sample data. Thanks!

jdminton
12 - Quasar

This should work for you. Unfortunately, it does take more steps to do this in Alteryx.

Jenina
8 - Asteroid

@jdminton  I am trying this now, could you pls send me the input you used, thank you!

jdminton
12 - Quasar

@Jenina I used the one you provided ;) I did start the data on line 2 though in the configuration.

Labels