We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Calculation value based on multiple conditions

sophievanluin
7 - Meteor

Hi there,

 

I would like to make a calculation based on the columns below:

 

Project IDManaging Office SystemManaging Office Postal
1234Amsterdam 
1234Amsterdam 
1234Amsterdam 
5678Rotterdam 
5678Amsterdam 
9101Rotterdam 
9101Rotterdam 
4321Amsterdam 
4321Rotterdam 
4321The Hague 
4321Rotterdam 

 

 

This data is just a small example of a larger dataset, but the idea is the same.

 

I would like to calculate the 'Managing Office Postal" based on the "Project ID" and the "Managing Office System".

 

  • For every Project ID where the Managing Office System is the same, the Managing Office Postal should remain the same as the mentioned city.
  • For every Project ID where the Managing Office System is not the same, the Managing Office Postal should change to "National"

 

Example results:

 

 

Project IDManaging Office SystemManaging Office Postal
1234AmsterdamAmsterdam
1234AmsterdamAmsterdam
1234AmsterdamAmsterdam
5678RotterdamNational
5678AmsterdamNational
9101RotterdamRotterdam
9101RotterdamRotterdam
4321AmsterdamNational
4321RotterdamNational
4321The HagueNational
4321RotterdamNational

 

How do I integrate this in my workflow? Thanks in advance.

 

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @sophievanluin 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1644331420137.png

 

Hope this helps : )

 

JaeLim
Alteryx Alumni (Retired)

HIi @sophievanluin 

Please see my take on this. I mainly utilized the count distinct action in the "summarize tool" to see how many different managing office systems per Project ID. 

Calculation value based on multiple condition.PNG

Hope this helps!

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @sophievanluin 

Cheers and have a nice day!

Labels
Top Solution Authors