Alteryx Designer Desktop Discussions

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

Assign Value Based on Number of Records Per Group

hellyars
Pulsar

See.  Example below.  Each record belongs to a Group and has a CODE assigned to it that translates to a COLOR. 

 

If there is only 1 record per GROUP then COLOR equals CODE.

If there is > 1 record per group and CODE is the same than COLOR = CODE

If there is > 1 record per GROUP and CODE is not the same then COLOR equals "J"

 

How can I make this happen

 

 

 

RecordIDGROUPNMBR_PERCODECOLOR (OUTPUT)
1

Hot Dog

1BB
2Hamburger1RR
3Nachos1GG
4Nachos2GG
5Tortilla1YY
6Tacos1BJ
7Tacos2YJ
8Steak1OO
9Burrito1BJ
10Burrito2GJ
11Burrito3OJ

 

2 ANTWORTEN 2
AngelosPachis
Nebula

Hi @hellyars ,

 

Can you try the following workflow? It implements the logic you explained in your previous post.

 

AngelosPachis_0-1613146446244.png

 

Hope that helps,

 

Angelos

 

messi007
15 - Aurora
15 - Aurora

@hellyars,

 

Please see below:

messi007_0-1613147665298.png

 

 

Attached the workflow,

 

Hope that helps!

Regards

Beschriftungen