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

How to create new columns based on a single criteria efficiently?

madhurinani
8 - Asteroid

Hello,

For the below image, I need to create multiple new columns (it can be Total Number, Total Count, Total/count etc). 
All those new columns should be based on a single logic i.e It should only be based on column Name which have ESOP as its value.

 

How can I try to use the Formula tool in an efficient way?

 

I have attached the workbook for reference. 

madhurinani_0-1658253362216.png

 

5 REPLIES 5
IraWatt
17 - Castor
17 - Castor

Hey @madhurinani,

Here is one way to do this:

IraWatt_1-1658254047669.png

Any questions or issues please ask :)
HTH!
Ira

 

madhurinani
8 - Asteroid

@IraWatt :

This is not what I was expecting.

Let me provide you a better example.

See the below pic.

 

madhurinani_0-1658301647221.png

Taking example from Group A--

 

Like New column 1 could be 7/3

New column 2 would be 7+3

New column 3 would be 7-3

 

All these calc should only work for the row which has ESOP in the Name column.

 

I want something like a global formula that only runs for ESOP and then calc the new column.

 

Or if you could help me figure out how can i create a formula which creeates New Column 1 (addition of 7+3) only for ESOP records

IraWatt
17 - Castor
17 - Castor

Hey @madhurinani,

Okay all you need to do is use a formula tool like this:

IraWatt_0-1658304964183.png

 

The community has some quick and easy videos on formulas and the Formula Tool here https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Writing%20... 

 

 

 

Amol_Telore
11 - Bolide

Hey @madhurinani 

 

One way of doing this, use IF ELSE formula.

 

Amol_Telore_0-1658304732841.png

 

madhurinani
8 - Asteroid

Thanks @Amol_Telore  and @IraWatt .

Both your logic makes sense. I still need to use the ESOP condition always in my multi field formula. 

 

Thanks for your help.

Labels
Top Solution Authors