Tutorial Workshop 3 v3
Tutorial Workshop 3 v3
As part of the marketing team for restaurant food delivery platform, DeliverEats, you monitor weekly sales delivery data within your Inner
Western Sydney network of restaurants, and report on the results. You need to include visual summaries of the data in your report,
including the following charts and graphs that will:
Indicate the distribution of time of orders with a histogram;
Show the restaurant’s order volume along with their average customer ratings on a combo chart;
Determine whether there’s any relationship between delivery time and customer ratings on delivery with a scatterplot;
Show the proportion of customers using a particular payment mode.
In this workshop you will learn how to:
Import data into Excel from a different file type;
Insert data using =XLOOKUP (and =VLOOKUP for earlier Excel versions)
Combine (concatenate) and split data (=RIGHT and Text-to-Column);
Insert and edit graphs and charts.
From the Tutorial folder under Module 3, locate the files Tut3 data.xlsx and Tut3 import.txt and save the file as you would normally do to
retrieve later.
1) Import data to Sheet1: There are several ways that you can import data from a non-Excel file. With some files, such as the text file
we’re using, the quickest means is to simply File-Open or even copy/paste. However, to show you the procedure that gives you most
flexibility in terms of file-type access, we’ll use the menu-driven method.
A delimiter in
Excel is the
symbol that
is separating
the data
3) Find and select the Tut3 import text file. Click Import. (e.g., spaces,
4) Excel automatically delimits (separates) the data into columns based on the delimiter it recognises in the source file (in this case Tabs). commas,
You have options to change the delimiter. You also have options for where to load the data. Use the Load option to place the data in tabs, or some
our current worksheet, Sheet1 at cell A:1. other symbol)
Page 1 of 16
Notice that Excel has imported data into a preformatted Excel table with the Filter option activated. Rename Sheet1 to Restaurant
Data
NB: If you
5) Splitting data using Text to Columns: Insert two new columns to the right of Column B to make space for our suburb and postcode
don’t insert
data. columns for
split data,
6) Highlight Column B. From the Data ribbon, select Text to Columns and the Convert Text to Columns Wizard will appear. Click Next> the new data
will ask to
replace
existing data
in columns to
the right
Page 2 of 16
7) This time, we will use Comma as our delimiter, so check the Comma option. Click Next>.
8) In the final step of the Wizard, note the Destination. This address indicates where the first column of split data will appear. Click
Finish. Click OK to replace data.
Page 3 of 16
9) Type appropriate column headings to describe the variables for the newly split data. Return to your Orders Data worksheet. CONCATENATE Is
the technical term
10) Combining data using concatenation: Insert a new column after StreetName to contain your newly combined data, and name the new for linking things
column StreetAddress. together. You can
also use the
=CONCATENATE
11) The most recent version of Excel inserted columns default formatting will replicate that of the leftmost column, which in this case is text function (with
text. This needs to be changed to General for the formula to return a result. From the Home ribbon, highlight your newly inserted less flexibility).
column H, and change the formatting in the Numbers group dropdown to General.
12) We’re going to use the ampersand (&) in a formula to concatenate (combine) the data in the House_UnitID and StreetName variables.
In cell H2, enter the following formula: =F2&" "&G2. NB: Make sure you include a space between the “quotation marks” to separate
the data in our results column. In plain English this formula translates as: Take the contents of F2, combine (&) with a space (“ “), and
then combine (&) with the contents of G2.
Page 4 of 16
13) Copy the formula to the rest of the rows. You should achieve the following result in column H.
14) You can now Copy column H and Paste Special Values to column F, and then delete column G and H.
=LEFT, =RIGHT and
15) Splitting data using (=RIGHT). We want to extract the postcode into its own column from the data under Suburb. We could simply use =MID functions, are
the Text to Columns feature, but let’s learn something new! Excel has a suite of what are called string functions that enable you to called string functions
extract data from various positions within a cell to a new location. In this case we want extract the postcode that appears 4 characters in Excel. For a simple
demonstration of
from the right Suburb data. Insert a new column to the right of Suburb and label it Postcode. each, Ctrl + click here
16) In cell H2, enter the following formula: =RIGHT(G2,4). Notice once you open the parenthesis, Excel indicates the parameters that it’s
looking for (text, [num_chars]). The function translates as: Extract 4 characters (num_chars) from the right (=RIGHT) of the data in cell
G2. Copy the formula to the rest of the rows.
NB: For more advanced Excel users, how can you now remove the postcode from column G? [Flash fill? Power Query?]
Page 5 of 16
17) Look up and insert data from a different table using =XLOOKUP. This function (and =VLOOKUP) is regularly ranked in the top ten of
‘must knows’ in Excel. Use XLOOKUP when you need to find (lookup) and insert data in a table or a range by column or row. For For earlier Excel
example, to look up a price of product, or find a customer’s name based on their ID number in your CRM. Three parameters need to be versions that do not
specified for the function: 1) The lookup value (what you want to look up); 2) The range of data where you want to look for it; 3) The feature XLOOKUP,
range of data that contains the value to return. Ctrl + click here
Let’s go! First insert a column to the right of RestaurantID and label it Restaurant.
a) Go to cell E2 to build your formula. Type =XLOOKUP( . Once you’ve opened the parenthesis, Excel allows you to click and select
anywhere in your worksheet, workbook or even another Excel workbook that you have open. Click in cell D2 to select to reference
what you want to look up (i.e. the restaurant ID).
b) Now go to the Sheet you labelled Restaurant data and select the range of data in the table you want to look up (i.e. the list of
restaurant IDs, A2:A21).
c) Then enter the range that contains the data that you want returned (i.e. the restaurant name, B2:B21).
18) Now that we have our data organised how we want it, let’s create our report by visually summarising our data using charts and graphs.
All our visualisations will appear in one sheet, linked to the others – almost like a mini dashboard. Name a new sheet Weekly Report.
Move the sheet so that it appears before Orders data. We will eventually put all our chart/graph visualisations in the new, Weekly
Report sheet. Go back to the Orders Data worksheet tab.
Page 6 of 16
19) Inserting and editing charts: There are several ways to insert charts and
graphs in Excel. In each case, you should generally highlight the data you
want to plot first. Doing so provides Excel with the information it needs to
recommend charts/graphs. The following options are available:
From the worksheet: Highlight data, then click the Quick Analysis
button that appears at the end of the range and click the CHARTS tab
From the menu: Highlight data, and go to the Insert ribbon. From
here you can either select Recommended Charts, or choose your preferred chart type from the options
available.
To create our first chart showing the distribution of orders over time of day, highlight the Time data, and insert a chart using any
one of the methods above. Because we are interested in the distribution of data, a histogram is an appropriate visualisation.
NB: If you use the menu method, you can select the histogram directly or from the options under the All Charts tab if you select
Recommended Charts. All other methods will generate a Clustered Column chart, which you will need to change to Histogram
from the dialogue box (Quick Analysis method), or via the Change Chart Type button (Alt+F1 method).
20) Cut-paste your chart into the Weekly Report worksheet and expand its size so that you can see the horizontal axis labels in full.
Page 7 of 16
Page 8 of 16
21) Charts are made of:
Elements (all the characteristics of a chart such as titles, labels, gridlines, legends and accompanying styles), each with various
options, and;
Series, or data series, which is just a collection of numbers (data) in the same column or same row that you’re plotting. In this case
our data series is the data in the Time column.
Click anywhere in the chart area and a shortcut button enabling you to add or remove chart elements will appear together with a
button to change style for the histogram. Click the checkbox Axis title and name both axes appropriately. You can also edit any of the
chart elements, by clicking on them (e.g. clicking on the Chart Title). Click Chart Title and rename it Orders by Time of Day
22) What are the busiest times for orders? More information would improve the usefulness of our histogram if we narrowed the time
categories, which currently approximates 90m. To do this, click into the horizontal category axis. Notice the Format Axis menu
appears on the right of the screen. Choose the little column chart icon to activate Axis Options. Click on the Number of bins radio
button and change the number to 12. We now get a rather different picture of restaurant peak times.
Page 9 of 16
23) For our second visualisation, we want to be able to show each restaurant order volume during the week and average customer ratings
NB: The PivotChart
for the restaurant. We’re going to build this chart rather than select all the data series at once. Select the data series range for
Fields menu is called a
RestaurantName, and insert the Recommended Chart, Clustered Bar chart. Excel will place this chart in a new Sheet along with a Pivot contextual menu,
table containing a count of the times the restaurant name appears in the column (i.e. equating to the number of orders placed with the because it is only
restaurant during the week). A menu for PivotChart Fields will open, which we’ll come to later. activated when you’re
in the context of the
pivot chart (clicking
24) Change the Chart Type to a Clustered Column chart: Click into the chart and go to the Design tab. Select Change Chart Type and outside of the chart
select the first option, Clustered Column, and OK. will close the menu).
An added benefit of
Pivot Charts is that we
can make the chart
interactive!
25) Plot ratings into the chart using PivotChart Fields menu: From the list of fields in the PivotChart Fields list, scroll down and check the
RatingFood and RatingDel boxes. Your Pivot table will extend to include these two new fields. (Move your chart to see the additional
columns.)
Page 10 of 16
26) Change values of ratings to averages: The fields plotted are listed in the Ʃ VALUES box. Currently, the ratings fields appear as a Sum of
Ratings. We want to change these to appear as average ratings. Select the dropdown arrow for the first Sum of Ratings field listed and
select the Value Field Settings option from the menu. Change the value to Average. Repeat for the RatingsDel field.
Page 11 of 16
27) Change Chart Type to Combo: Click into the chart and Change Chart Type to Combo. The Change Chart Type dialogue box will open.
From the dropdown options for chart type, select Line for each of the ratings fields. Check the boxes for Secondary Axis for the ratings
field as well. Click OK. Your Combo chart now clearly indicates order volume of restaurants along with their ratings, accompanied by
an axis relevant to the fields. Add a legend to the chart and give an appropriate title to your chart and axes. Resize and play around
you’re your chart options to improve readability and presentation (e.g. hide field buttons; find a better placement for legend).
Copy/Paste to your Weekly Report worksheet
28) Create a Scatterplot of delivery time and customer ratings for delivery: Highlight the data series for the DelTime_mins field. Hold
down the Ctrl key and highlight the data series for RatingDel. From the Insert ribbon and Chart group, select the scatterplot icon.
Page 12 of 16
29) Click into the y-axis in the chart area and work through the Axis Options to fix the scale. Click into the chart canvas to activate the
general chart options. Click on the + sign and add a Trendline. Name your chart and axes. Copy/Paste to Weekly Report.
Page 13 of 16
Customer delivery ratings and delivery times
5
Customer delivery ratings
0
10 15 20 25 30 35 40 45 50 55
Delivery time (minutes)
30) On your own, create a Pie Chart to indicate the proportion of modes of payment. Think carefully about what elements to include.
Copy/paste to your Weekly Report. An example pie chart is provided below:
19%
35%
46%
EXTENSION TASK:
Create any charts you believe would effectively summarise the data in the Restaurant data worksheet. What insight can be gained from
the information?
Page 14 of 16
TUTORIAL WORKSHOP 3 QUESTIONS
1) What conclusions can you draw based on the time of day distribution of orders? What might this suggest for restaurant operations?
ANSWER:
2) What do you observe from the data summarised in the combo chart?
ANSWER:
3) What is the relationship between delivery time and customer delivery ratings?
ANSWER:
4) The payment mode of the customer may have implications for the delivery service personnel as well as incurring costs to the restaurant.
What could you suggest to the delivery service/restaurant?
ANSWER:
5) Explain why the selected visualisations are appropriate to represent the data
ANSWER:
Page 15 of 16
SUPPLMENTARY INSTRUCTION: FOR EXCEL VERSIONS THAT DO NOT HAVE =XLOOKUP USE=VLOOKUP
Look up and insert data from a different table using =VLOOKUP. This function is regularly ranked in the top ten of ‘must knows’ in
Excel. Use VLOOKUP when you need to find (lookup) and insert data in a table or a range by column (i.e. vertically, which is what the NB: The lookup value
‘V’ stands for). For example, to look up a price of product, or find a customer’s name based on their ID number in your CRM. Four must always be in the
parameters need to be specified for the function: 1) The lookup value (what you want to look up); 2) The table range where you want FIRST column in the
range of the lookup
to look for it; 3) The number of column that contains the value to return (column index number), and; 4) Whether you want an
table/array to work
approximate or an exact match (1/TRUE or 0/FALSE). correctly. For
example, RestaurantID
Let’s go! First insert a column to the right of RestaurantID and label it Restaurant. correctly appears in
Column A in our
a) Go to cell E2 to build your formula. Type =VLOOKUP( . Once you’ve opened the parenthesis, Excel allows you to click and select Restaurant worksheet.
anywhere in your worksheet, workbook or even another Excel workbook that you have open. Click in cell D2 to select to reference
what you want to look up (i.e. the restaurant ID).
b) Now go to the Sheet you labelled Restaurant data and select the range of data in the table you want to look up (i.e. A2:B21).
Make the range absolute otherwise Excel will treat it as relative and the range will change as it copied to other rows.
c) Enter the index number of the column where the data resides that you want (i.e. enter 2 being the number of column, B).
d) Lastly, because you want an exact and not approximate name, type the word FALSE (or alternatively the number 0 for FALSE). Hit
Enter.
Page 16 of 16