Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Creating flags in dataset

AMCM0806
6 - Meteoroid

I have a sample dataset attached. 

 

I would like to create a new column in this dataset that will give me a "1" or "0" flag based on whether a position contains at least one "ready in emergency" candidates. 

 

The formula I'm using is creating the flag on the Candidate level, but I want the flag to reflect it on the position level. For example, as long as there is one "ready in emergency" candidate in a given position, then the flag will be 0. 

 

IF
(
[Role] = "Partner" OR
[Role] = "President"
)
AND
NOT Contains([Readiness], "Ready in Emergency")
THEN
1
ELSE
0
ENDIF

1 REPLY 1
Qiu
21 - Polaris
21 - Polaris

@AMCM0806 
We can filter out the Rows with Flag "0" after your formula then take unique entries on "Position" then join back to the data stream with key "Position".
I believe You data is missing the value for "Data" and "Position" for the last row.

0829-AMCM0806.png0829-AMCM0806A.png

Labels
Top Solution Authors