Alteryx Designer Desktop Discussions

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

Count of Records

Masond3
8 - Asteroid

Afternoon Team, 


Hope all is well,

 

I am hoping you can help me. I have manually manipulated my data in excel and i am hoping i can leverage the power of Alteryx to help me automate this process going forward. 

 

In my Raw input File (Companies1) i have the following 4 columns 

 

Record TypeIDParent IDGlobal EntityId

 

 

Example Input 

 

Record TypeIDParent IDGlobal EntityId
EMEA0013a00001k5ccbAAA0013a00001f9VFuAAM0013a00001f9VFuAAM
EMEA0013a00001k5coyAAA0013a00001f9VFuAAM0013a00001f9VFuAAM
EMEA0013a00001k5cbOAAQ0013a00001f9VFuAAM0013a00001f9VFuAAM
EMEA0013a00001k763iAAA0013a00001f9VFuAAM0013a00001f9VFuAAM
EMEA0013a00001f9VFuAAM 0013a00001f9VFuAAM

 

Step 1 - Produce a new tab which has the Global EntityID de duped 

 

Once we have a new tab and the de-duped Global EntityID ( we will use this de-duped list and reference company1 input file to produce the final calculation) 

 

Step 2 - Count how many times "Global entityid" on the new tab is in the "Companies1" Global EntityID Column 

 

Create a new field called "Total" and the output of this calculation will go in the new column 

 

Step 3 - Count how many times "Global entityid" on the new tab is in the "Companies1" Parent Column 

 

Create a new field called " # Of Parents" and the output of this calculation will go in the new column 

 

Step 3 - math equation "Total - # Of Parents". Put this output into a field called "Difference" 

Step 4 - produce an outcome column which is an if statement to produce following output 

If Total = 1 & Difference = 1 Then "Standalone"

If Total > 1 & Difference = 1 then "1 hierarchy"

IF difference > 1 then "Multi Level Hierarchy"

 

Expected Output File headers

Global EntityIdTotal # Of ParentsDifferenceOutcome

 

 

Expected Outcome 

 

Global EntityIdTotal # Of ParentsDifferenceOutcome
0013a00001f9VFuAAM5411 hierarchy

 

Looking forward to your help & Guidance 

2 REPLIES 2
TrevorS
Alteryx Alumni (Retired)

Hello @Masond3 

This is absolutely possible to do with Alteryx. Can you please share your workflow so that the Community can see what you have completed so far? This will help the community to troubleshoot quicker for you.
Thanks!

TrevorS

Community Moderator
messi007
15 - Aurora
15 - Aurora

Dear @Masond3,

 

Below the solution 🙂

 

messi007_1-1604942955108.png

 

 

Attached the workflow as well,

 

Please mark it as solved if it solve you problem,

 

Regards,

Labels