Alteryx Designer Desktop Discussions

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

If record count achieved, then add column

Inactive User
Not applicable

Hi everyone, 

 

I want to add a column in my database. If in my data have 20 records, then all values in the new column should be "yes" else "no". How can I do it? I tried it with the formula, but it does not work.

4 REPLIES 4
DenisZ
11 - Bolide

Please provide the databook for reference.

DataNath
17 - Castor

Hey @Inactive User, how does this look? The main focus is the bottom stream here, where we add a RecordID to each row and then find the maximum RecordID. If this is 20 or more then we add a 'Yes' flag, otherwise this flag is assigned 'No'. Finally, we just append this flag back on to the original dataset. Here it is with 15 records:

 

DataNath_0-1666086916950.png

 

And 20:

 

DataNath_1-1666086938170.png

 

If you want to change the threshold (and also the operator i.e. specifically = rather than equal to or larger than) then just change the Formula expression here:

 

DataNath_2-1666086974471.png

grazitti_sapna
17 - Castor

Hi @Inactive User , You can try out below workflow. It will resolve your problem. Let me know if you need any other help.

Sapna Gupta
Inactive User
Not applicable

Thank you, guys, for the solutions. The workflows are very helpful  

Labels