Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

Filtering with certain criteria

SH_94
11 - Bolide

Hi Community,

 

I would like to ask how should i create workflow or make formula if i only want to filter two items : I and C as per screenshot below :

 

In the screenshot below, there are three items under TransactionType column : I, C and P. However, i only want the information related to I and C. P will be excluded.

 

Do anyone have any idea how to make this workflow?

Jacob_94_0-1615894442949.png

 

8 REPLIES 8
Emil_Kos
17 - Castor
17 - Castor

Hi @SH_94,

 

I believe this formula should help you:

 

[Transactional Type] IN ('I','C')

SH_94
11 - Bolide

Hi @Emil_Kos ,

 

Thanks a lot for the workflow shared.

 

I would like to ask about the formula = [Transactional Type] IN .Let said today i had multiple of items in the Transaction type column and i want to filter out P only. Is it i make the formula as below: 

 

[Transactional Type] OUT ('P')

 

Emil_Kos
17 - Castor
17 - Castor

Hi @SH_94,

 

In that case, you don't need a formula. You can easily identify the filter tool in order to achieve your goal:

 

Emil_Kos_0-1615895100180.png

Alternatively, you can write:

[Transactional Type] != "P"

SH_94
11 - Bolide

Hi @Emil_Kos ,

 

Thanks a lot for the sharing on how to use the filtering tools wisely.

 

Appreciate it a lot.😊

 

 

 

AngelosPachis
16 - Nebula

@SH_94  an In function is similar to multiple OR expressions in an IF statement.

 

For example, if you want the transaction type to be either "I" or "C", you can type

 

IF [Transaction Type]="I" OR  [Transaction Type]="C"  THEN do_action_1

ELSE ...

 

With an In  function, that can be re-written as: 

 

IF [Transaction Type] IN ("C","I") THEN do_action_1

ELSE ...

 

The highlighted text means exactly the same thing to Alteryx, but an In function can make it easier if you have many OR statements to type

SH_94
11 - Bolide

Hi @Emil_Kos ,

 

Just would like to further understand on the filtering tool, if i want to filter out the " C and I" from the transaction type and under the transaction type, there are multiple of items , not only C , I and P.

 

May i know how should we build the workflow in this case?

 

 

Emil_Kos
17 - Castor
17 - Castor

Hi @SH_94,

 

Not sure if I fully understand. You can use this formula to keep only relevant rows I and C

 

[Transactional Type] IN ('I','C')

 

If you want to make it dynamic and make user maintain the list you can create an excel file that would have transaction types in scope and use it in order to filter the data:

 

Emil_Kos_0-1615896074645.png

 

AngelosPachis
16 - Nebula

@SH_94  you can also use a filter tool as @Emil_Kos , but then also make use of the expressions we introduced earlier.

 

For example, if you have different transaction types as shown below

 

AngelosPachis_0-1615896885178.png

 

you can use either the OR expression or the IN function to filter out transaction types "I" and "C"

 

AngelosPachis_1-1615896926328.png

 

I have done both so you can see that the outcome is the same, although the expression changes. Just check the T output anchor of the filter tools

Labels