In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Another begginer question

lene3
5 - Atom

I am really new to Alteryx and I want to apply this simple example to new analysis of a large data set:

 

 SetIDSetID
1123Ana
2123Ana
3124Sorin
4124Soran
*  

 

I tried different IF statements to say that if both SetID and SetID are the same then "True" else "False" endif 

I know this must be easy and I must not write the statement correctly, but could anybody offer some help? I would really appreciate it, as I am learning....

4 REPLIES 4
AustinRiggs94
8 - Asteroid

In The Formula tool, there are coditional statements already written out. you just have to fill in the lower cases

 

Ex. IF [SetID] = [SetID] THEN "True" ELSE "False" ENDIF

lene3
5 - Atom

Thanks for the quick reply, AustinRiggs94!

 

My issue is that I need to compare the SetID and Name together.

I used this:

f [SetID] and [Name]==[SetID] and [Name] then "True" else "False" endif

 

and I was hoping to get back something like this:

SetIDNameResult
123AnaTRUE
123AnaTRUE
124SorinFALSE
124SoranFALSE

 

but all I get back is this:

 

123Ana[Null]
123Ana[Null]
124Sorin[Null]
124Soran[Null]
[Null][Null][Null]
danrh
13 - Pulsar

You could achieve this a few different ways, but the cleanest (in my opinion), would be something like this:

image.png

The first Summarize groups the names/IDs together (getting rid of exact duplicates), the second counts how many records for each ID still exist, and Formula checks to see if it's just one, and the Join brings it back to your original data. You could potentially use a Multi-Row Formula, but if you end up with more than two records with the same ID, you run the risk of two of them matching and the third not. The method here has the benefit that it will only produce true if ALL records for a given ID share the same name.

 

Take a look, hope it helps!

lene3
5 - Atom

Perfect! This is exactly what I was looking for. Now I understand what I was missing.

Thank you, danrh!

Labels
Top Solution Authors