10.1 Clean Data

Alteryx Essentials Workshop 2 - Reporting
8 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
€47.98
List Price:  €67.18
You save:  €19.19
£39.89
List Price:  £55.86
You save:  £15.96
CA$69.90
List Price:  CA$97.87
You save:  CA$27.96
A$76.87
List Price:  A$107.62
You save:  A$30.75
S$67.31
List Price:  S$94.24
You save:  S$26.93
HK$389.14
List Price:  HK$544.83
You save:  HK$155.68
CHF 44.67
List Price:  CHF 62.54
You save:  CHF 17.87
NOK kr553.51
List Price:  NOK kr774.97
You save:  NOK kr221.45
DKK kr357.84
List Price:  DKK kr501
You save:  DKK kr143.16
NZ$85.68
List Price:  NZ$119.95
You save:  NZ$34.27
د.إ183.61
List Price:  د.إ257.07
You save:  د.إ73.46
৳5,972.22
List Price:  ৳8,361.58
You save:  ৳2,389.36
₹4,221.07
List Price:  ₹5,909.84
You save:  ₹1,688.76
RM223.35
List Price:  RM312.71
You save:  RM89.36
₦84,627.22
List Price:  ₦118,484.88
You save:  ₦33,857.66
₨13,887.22
List Price:  ₨19,443.22
You save:  ₨5,556
฿1,722.96
List Price:  ฿2,412.28
You save:  ฿689.32
₺1,727.27
List Price:  ₺2,418.32
You save:  ₺691.05
B$289.99
List Price:  B$406.01
You save:  B$116.02
R905.58
List Price:  R1,267.89
You save:  R362.30
Лв93.83
List Price:  Лв131.37
You save:  Лв37.54
₩70,211.45
List Price:  ₩98,301.65
You save:  ₩28,090.20
₪185.06
List Price:  ₪259.10
You save:  ₪74.04
₱2,946.36
List Price:  ₱4,125.14
You save:  ₱1,178.78
¥7,736.95
List Price:  ¥10,832.35
You save:  ¥3,095.40
MX$1,021.22
List Price:  MX$1,429.79
You save:  MX$408.57
QR182.26
List Price:  QR255.18
You save:  QR72.92
P683.46
List Price:  P956.90
You save:  P273.44
KSh6,472.14
List Price:  KSh9,061.51
You save:  KSh2,589.37
E£2,482.01
List Price:  E£3,475.01
You save:  E£993
ብር6,118.22
List Price:  ብር8,566
You save:  ብር2,447.77
Kz45,640.87
List Price:  Kz63,900.87
You save:  Kz18,260
CLP$49,324.13
List Price:  CLP$69,057.73
You save:  CLP$19,733.60
CN¥362.07
List Price:  CN¥506.93
You save:  CN¥144.86
RD$3,012.01
List Price:  RD$4,217.06
You save:  RD$1,205.04
DA6,712.40
List Price:  DA9,397.90
You save:  DA2,685.50
FJ$113.77
List Price:  FJ$159.29
You save:  FJ$45.51
Q385.78
List Price:  Q540.13
You save:  Q154.34
GY$10,455.70
List Price:  GY$14,638.82
You save:  GY$4,183.11
ISK kr6,982.60
List Price:  ISK kr9,776.20
You save:  ISK kr2,793.60
DH502.76
List Price:  DH703.91
You save:  DH201.14
L910.90
List Price:  L1,275.33
You save:  L364.43
ден2,951.80
List Price:  ден4,132.76
You save:  ден1,180.95
MOP$400.70
List Price:  MOP$561.01
You save:  MOP$160.31
N$906.31
List Price:  N$1,268.91
You save:  N$362.60
C$1,838.97
List Price:  C$2,574.70
You save:  C$735.73
रु6,749.45
List Price:  रु9,449.77
You save:  रु2,700.32
S/189.51
List Price:  S/265.32
You save:  S/75.81
K201.21
List Price:  K281.71
You save:  K80.50
SAR187.68
List Price:  SAR262.77
You save:  SAR75.08
ZK1,382
List Price:  ZK1,934.92
You save:  ZK552.91
L238.86
List Price:  L334.42
You save:  L95.56
Kč1,216.06
List Price:  Kč1,702.59
You save:  Kč486.52
Ft19,746.05
List Price:  Ft27,646.05
You save:  Ft7,900
SEK kr551.69
List Price:  SEK kr772.42
You save:  SEK kr220.72
ARS$50,182.44
List Price:  ARS$70,259.44
You save:  ARS$20,076.99
Bs345.34
List Price:  Bs483.50
You save:  Bs138.16
COP$219,443.60
List Price:  COP$307,238.59
You save:  COP$87,794.99
₡25,456.77
List Price:  ₡35,641.51
You save:  ₡10,184.74
L1,262.95
List Price:  L1,768.23
You save:  L505.28
₲390,155.46
List Price:  ₲546,248.87
You save:  ₲156,093.40
$U2,130.69
List Price:  $U2,983.14
You save:  $U852.45
zł208.13
List Price:  zł291.40
You save:  zł83.27
Already have an account? Log In

Transcript

As discussed in the previous video, we're going to kick off this sales report by cleaning the data set from duplicates nulls incorrect rounding, and then perform some basic calculations. Let's start by importing our supermarket data spreadsheet. So we'll go to the Insert tab, drag in the input data tool, and connect to 10.0 supermarket data. Since we've already walked through the data set in the previous video, we'll dive straight into removing these duplicates. Let's drag in the unique tool from the preparation tab and connect it to our input data tool. You will notice that there's a U and D output anchor which means unique records will go to you and duplicate records will go to D. In the configuration pane.

Let's select all items. The reason why we're selecting all fields is because it's perfectly possible To sell an item of similar description, but over two sections or aisles. For example, we have cottage cheese in dairy, and another cottage cheese in the cheese section. If we select all fields, that means both cottage cheeses stay since they're in different sections, but if we select the item only, it will remove the second version of cottage cheese. However, since we want to keep both, we're going to select all unique fields. Let's add a browse tool to both unique duplicates for easy viewing.

So let's press Ctrl Shift B, and then we'll run our workflow and check the outputs. We should have 90 unique records and nine duplicate records. Now it's time to update the section column. What we're going to do is similar to an Excel v lock up, or look up the item in our supermarket data into the supermarket items table spreadsheet. So let's drag in another input data tool and connect this to our supermarket items table spreadsheet. As you can see, this contains a clean list of all the items in each section.

We'll now go to the join tab and drag in a find replace tool. And we'll connect the unique output anchor from unique into the find input anchor from our find replace tool will then drag the input data anchor from supermarket items table into the Replace anchor. In the configuration pane on the left, we want to match the entire field and find the item within our supermarket data And compare it to the item name in the supermarket items table data. Once it's found a match, we then want to append values to the end of the data set. And we want to append it to the section column. Let's add a browse tool with Ctrl Shift B.

Let's run our workflow with Ctrl R. And now we have a section with no more nulls. But it's been appended to the end, and it's called section two, because we already have a column called section. We want the section next to the items. So let's fix this by going to the preparation tab and dragging in the Select tool. In the configuration, we'll move section two all the way up. So it's under Section We'll untick the original section, and rename section two to section.

While we're here, let's update the profitable column to type into 16. Because if an item is profitable, I wanted to return a one since this needs to be an integer. Let's add a browse tool with Ctrl Shift B and run our workflow with Ctrl R. And you should now have section completely populated. The next thing we need to update is the unit sold column. We're currently selling fractions of items when we should be selling whole numbers. So staying in the preparation tab, let's drag in a formula tool and connect it to the output of our find replace tool.

Let's put a formula in for unit sold. And we'll select the function of round. If it doesn't appear in your list here, you can type in round and click on that. The first parameter x is asking us which column we want to round. So we'll click on the associated variables button here and select units sold. The last parameter is asking us to which multiplier we want to round up to.

We want a multiplier of one which will make it a whole number. Let's add a browse tool with Ctrl Shift B and run our workflow with Ctrl R. And now we have our unit sold nicely rounded up. So sticking with the formula tool, we're going to calculate our total revenue, total cost of goods sold profit margin and that profitable flag. Let's add a new formula for Total Revenue, which is going to be the sales price multiplied by unit sold will add a formula for total cost of goods sold. And that's going to be our purchase price plus other Cost of Goods Sold multiplied by the unit sold. And then for profit margin, this will be calculated as profit divided by total cost of goods sold and profit is calculated with total revenue minus total cost of goods sold divided by total cost of goods sold.

And then lastly for profitable which we will Want to be a one or zero, we'll use the IF function. And the condition will be if profit margin is more than zero, then output a one. Otherwise output No. Let's run our workflow with Ctrl R. And now we have our total revenue, total cost of goods sold, profit margin and our profitable flag calculated. Let's take a break there because that was a lot of information to absorb. In this section of our workshop, we've cleaned up our data by removing duplicates, filling in nulls, rounding up down numbers, calculating totals, and even figured out if an item is profitable.

Now that our data is clean and ready to use in the next section of this workshop, we'll go over creating Our supermarket report with charts

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.