2.5 Filter

Alteryx Essentials Data Preparation
4 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$49.99
List Price:  $69.99
You save:  $20
€42.65
List Price:  €59.72
You save:  €17.06
£36.96
List Price:  £51.75
You save:  £14.78
CA$68.68
List Price:  CA$96.16
You save:  CA$27.47
A$76.24
List Price:  A$106.74
You save:  A$30.50
S$64.15
List Price:  S$89.82
You save:  S$25.66
HK$389.76
List Price:  HK$545.70
You save:  HK$155.93
CHF 39.96
List Price:  CHF 55.94
You save:  CHF 15.98
NOK kr500.71
List Price:  NOK kr701.04
You save:  NOK kr200.32
DKK kr318.41
List Price:  DKK kr445.79
You save:  DKK kr127.38
NZ$84.63
List Price:  NZ$118.48
You save:  NZ$33.85
د.إ183.58
List Price:  د.إ257.03
You save:  د.إ73.45
৳6,064.19
List Price:  ৳8,490.36
You save:  ৳2,426.16
₹4,410.03
List Price:  ₹6,174.40
You save:  ₹1,764.36
RM211.20
List Price:  RM295.70
You save:  RM84.50
₦76,552.18
List Price:  ₦107,179.18
You save:  ₦30,627
₨14,147.62
List Price:  ₨19,807.80
You save:  ₨5,660.18
฿1,614.75
List Price:  ฿2,260.78
You save:  ฿646.03
₺2,055.19
List Price:  ₺2,877.44
You save:  ₺822.24
B$272.34
List Price:  B$381.30
You save:  B$108.96
R878.87
List Price:  R1,230.49
You save:  R351.62
Лв83.35
List Price:  Лв116.70
You save:  Лв33.35
₩69,650.61
List Price:  ₩97,516.43
You save:  ₩27,865.81
₪167.46
List Price:  ₪234.46
You save:  ₪66.99
₱2,859.07
List Price:  ₱4,002.93
You save:  ₱1,143.85
¥7,355.05
List Price:  ¥10,297.66
You save:  ¥2,942.61
MX$930.26
List Price:  MX$1,302.44
You save:  MX$372.18
QR181.75
List Price:  QR254.47
You save:  QR72.71
P671.37
List Price:  P939.97
You save:  P268.60
KSh6,458.70
List Price:  KSh9,042.70
You save:  KSh2,584
E£2,428.95
List Price:  E£3,400.73
You save:  E£971.77
ብር7,102.98
List Price:  ብር9,944.74
You save:  ብር2,841.76
Kz45,588.63
List Price:  Kz63,827.73
You save:  Kz18,239.10
CLP$48,533.98
List Price:  CLP$67,951.45
You save:  CLP$19,417.47
CN¥356.46
List Price:  CN¥499.08
You save:  CN¥142.61
RD$3,144.19
List Price:  RD$4,402.12
You save:  RD$1,257.92
DA6,485.41
List Price:  DA9,080.10
You save:  DA2,594.68
FJ$112.54
List Price:  FJ$157.56
You save:  FJ$45.02
Q382.24
List Price:  Q535.16
You save:  Q152.92
GY$10,428.74
List Price:  GY$14,601.08
You save:  GY$4,172.33
ISK kr6,116.77
List Price:  ISK kr8,563.97
You save:  ISK kr2,447.20
DH449.55
List Price:  DH629.41
You save:  DH179.85
L831.30
List Price:  L1,163.88
You save:  L332.58
ден2,626.53
List Price:  ден3,677.36
You save:  ден1,050.82
MOP$400.41
List Price:  MOP$560.60
You save:  MOP$160.19
N$885.21
List Price:  N$1,239.36
You save:  N$354.15
C$1,837.33
List Price:  C$2,572.41
You save:  C$735.08
रु7,038.37
List Price:  रु9,854.29
You save:  रु2,815.91
S/176.50
List Price:  S/247.11
You save:  S/70.61
K210.42
List Price:  K294.61
You save:  K84.18
SAR187.59
List Price:  SAR262.64
You save:  SAR75.05
ZK1,176.14
List Price:  ZK1,646.70
You save:  ZK470.55
L216.34
List Price:  L302.89
You save:  L86.55
Kč1,042.36
List Price:  Kč1,459.38
You save:  Kč417.02
Ft16,858.10
List Price:  Ft23,602.69
You save:  Ft6,744.58
SEK kr470.33
List Price:  SEK kr658.51
You save:  SEK kr188.17
ARS$67,335.96
List Price:  ARS$94,275.73
You save:  ARS$26,939.77
Bs344.59
List Price:  Bs482.45
You save:  Bs137.86
COP$200,483.87
List Price:  COP$280,693.47
You save:  COP$80,209.59
₡25,201.39
List Price:  ₡35,283.96
You save:  ₡10,082.57
L1,309.43
List Price:  L1,833.31
You save:  L523.87
₲360,540.19
List Price:  ₲504,785.11
You save:  ₲144,244.92
$U1,999.90
List Price:  $U2,800.03
You save:  $U800.12
zł181.51
List Price:  zł254.13
You save:  zł72.62
Already have an account? Log In

Transcript

The filter tool allows you to query your data by using one or more expressions or conditions in your columns. The data set is then split into two, true and false. True is where the data meets the criteria you've set and false is where it doesn't. This tool is useful if you need to return only a specific set of records for your data. For example, if you have a list of employee information, but you only want to look up employees whose favorite coffee is along black, well, that's what I've illustrated in the slide here. Again, our first picture has our employee HR data set.

The second picture is where I've included the filter tool and put a criteria of favorite coffee equals one black. There are two browse tools here, one connected to a tee output for true and one connected to an F output for false. When I run the workflow, I get an output of five employees Have a favorite coffee of long black. Let's start a new workflow by importing spreadsheet 2.5 or go to the Insert tab, dragging our input data tool and connect to the 2.5 filter worksheet. We have our example HR file again with 30 employees in it. And let's just note the number of black coffees in there, we've got 12345 so let's go to the preparation tab and drag in our filter tool.

And in the configuration menu on the left, we have two main options a basic filter or a custom filter. Basic is what most people will select if they have one condition. In our case, we want to select how favorite coffee where a equals a long black The middle boxes are operator and the right box is the value we want to filter by. You will notice under custom filter, our tricks has populated the values and syntax based on our basic filter. Values wrapped around the square brackets are our variables. And the double quotes is the value that we're filtering by.

Let's add a browse tool to the true and false outputs of the filter tool. We can do this with our keyboard shortcut of Ctrl Shift B. And we'll run our workflow. Our data set has been filtered by one condition where an employee's favorite coffee as long black, as seen in the slide previously and manually counting just then. Let's now try a custom filter which is used for more complex expressions. Mainly if you have two or more conditions We'll click on filter, and we have the choice of typing directly into the expression editor or using these buttons here on the side.

The effects shows the list of functions available, and x shows the variables in our data set. Let's practice writing a custom filter. So we'll delete what's already in here. We'll start by clicking variables and adding favorite coffee. Let's put in equals and in double quotes type in long black with a space will then add another filter within our five employees and select where age is less than 30. So we'll type in and and in square brackets, type in age and use the less than or operator in typing 3030 doesn't need double quotes because it's a number not string.

Let's press the run workflow button or Ctrl R. And we can see our data set has been filtered by to conditions where an employee's favorite coffee is along black and their age is less than 30.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.