Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

How to perform excel COUNTIF function in Alteryx?

Nirmalkumar
6 - Meteoroid

I'm trying to perform a excel calculation in Alteryx. Need guidance in how to write the same in alteryx.

Attached sample excel book.

Formula : =IF(A3="","",IF(COUNTIF(A:A,A3)>1,COUNTIF(A$2:A3,A3),1)) .

To mark the count as 1 if found in first instance and the subsequent instance should be marked as 2,3,..... for a given Name/ID.

 

Thanks in advance. 

 

Nirmalkumar_0-1602161334262.png

 

4 REPLIES 4
AngelosPachis
16 - Nebula

Hi @Nirmalkumar ,

 

You can use a multi-row formula tool to count how many times each Name appears in your data set

Ben_H
11 - Bolide

Hi @Nirmalkumar,

 

You can use the Tile tool to achieve this result.

Ben_H_1-1602170348569.pngBen_H_2-1602170367061.png

 

I've attached an example workflow (note I filtered out the empty rows in your sample data)

 

To get the output you require you need to configure the Tile Method to Unique Value and set the unique value to your name field.

 

Make sure to check the "Leave unsorted" box also, this will ensure the output is in the same order as the input.

 

This configuration will asign an ascending number to each unique value in the name column (output as Tile Number) and then an ascending count of the times that name appears (Tile Sequence Number)

 

Ben_H_0-1602170270903.png

 

The sequence number is the value you are looking for.

 

Regards,

 

Ben

 

Nirmalkumar
6 - Meteoroid

Thank you @AngelosPachis . The solution you provided helped me but I find little hard to understand the tool. Reading thru it. thank you 🙂

Nirmalkumar
6 - Meteoroid

Hi @Ben_H,

Thank you for solution, It worked as I expected. To add the Null values I put in a Filter and then Union with the results. 

Labels