Skip to content

Commit

Permalink
Merge pull request #47 from LaunchCodeEducation/class-4-updates
Browse files Browse the repository at this point in the history
Class 4 updates
  • Loading branch information
jwoolbright23 authored Jun 10, 2024
2 parents 4a4a8a8 + 093ef66 commit 3435dcd
Show file tree
Hide file tree
Showing 9 changed files with 238 additions and 0 deletions.
11 changes: 11 additions & 0 deletions content/appendices/spreadsheet-mastery/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
+++
chapter = false
title = "Spreadsheet Mastery"
date = 2024-01-08T10:24:35-06:00
draft = false
weight = 1000
+++

## Content Links

{{% children %}}
153 changes: 153 additions & 0 deletions content/appendices/spreadsheet-mastery/exercises/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
+++
title = "Spreadsheet Mastery: Exercises"
date = 2024-01-08T10:24:35-06:00
draft = false
weight = 1
+++

Your responsibilities as a Data Analyst at Amazon encompass both reporting and analysis across various departments. Recently, your team received a request for a comprehensive analysis of shipping speed and status for orders shipped to India over the past three months. Upon reviewing the request, your department director concluded that more information is necessary before deciding to proceed with a full analysis.

As a result, your director has asked you to compile a concise report summarizing sales orders and associated shipping information from March 31, 2022 to June 29, 2022.

Additionally, your director would like specific information for a random sample of orders, for which the order IDs have been provided.

The initial reporting request specifies the following metrics, KPIs, and sample order information:
1. Reporting Period Begin Date.
1. Reporting Period End Date.
1. Count of days in Reporting Period.
1. Date of report preparation.
1. Total Order Count.
1. Total Unit Count.
1. Total Sales Dollars.
1. Average Order Value (AOV).
1. Average Unit Retail (AUR).
1. Units Per Transaction/Order (UPT).
1. Sales Dollars and % of Total Sales Dollars by Shipping Status Category.
1. Unit Counts and % of Total Units by Cancellation Status.
1. Date, Status, Ship Service Level, Units, Dollars, City, State, and Zip Code for these 20 Order IDs:

| Order ID | Order ID |
|-------------------------|-------------------------|
| 404-2822073-6488362 | 402-3840492-4873917 |
| 407-1425428-0087544 | 408-8226426-6214707 |
| 406-9907647-1673953 | 404-8659996-0325913 |
| 408-0047275-3547510 | 403-1323278-1035515 |
| 408-6217530-3383522 | 406-0203534-2738746 |
| 402-5622441-3675529 | 403-9063524-5621118 |
| 407-0452640-1414754 | 406-9685702-0163562 |
| 403-7617865-0366735 | 407-5692596-2928364 |
| 408-5897470-5138724 | 404-1500003-2290719 |
| 408-7795853-5203551 | 405-6656663-7334729 |


Ship Service Level and Zip Code for these 20 Order IDs:

| Order ID | Order ID |
|-------------------------|-------------------------|
| 408-0897859-0872345 | 406-5667488-4807518 |
| 404-5192536-7610731 | 404-0385252-9830703 |
| 402-1319583-3594710 | 402-4130969-7199506 |
| 405-0843296-7457920 | 408-7947698-5720302 |
| 402-7607638-8078742 | 402-4065058-6283510 |
| 404-3793288-3303541 | 404-0625941-9181127 |
| 403-6876910-7017123 | 171-7595817-4329100 |
| 405-6575169-1710717 | 408-0894500-2480315 |
| 407-8320886-2189149 | 404-4022285-8367511 |
| 403-8548938-0817920 | 171-5184553-5321935 |

Upon reviewing the report requirements, you realize that you do not have an existing report template for these specifications, so you will need to create one. A cleaned dataset has already been generated by another member of your team and is stored in a CSV file on the department network drive.

You know that your director likes to receive one workbook per project rather than multiple files, so you decide to use several worksheets within the same workbook.

You’re ready to get started and have a plan for how you’ll proceed, which you outlined as follows:
1. Download the dataset from Canvas. You will find it under *Files* > *Spreadsheet Mastery Resources* > Order Data.csv.
1. Open the file, save it as an Excel Workbook (*.xlsx), and name it "Order Summary Report_Your Name".
1. Rename the worksheet to Data.
1. Review the dataset and make note of anything you think will be helpful as you proceed.
1. Note to self: EDA and cleaning already performed by a colleague.
1. Add a new worksheet and name it Summary Report.
1. Add another new worksheet and name it Sample Order Data.
1. Reorder the worksheets so that the Summary Report is first, and the Data worksheet is last.
1. Using simple formatting options, create a Summary Report template that looks like this mock-up.

![Summary report template mock-up](pictures/summary-report-template.png?classes=border)

9. Create a template for the Sample Order Data that looks like this

![Sample order data template](pictures/sample-order-data.png?classes=border)

{{% notice blue Note "rocket" %}}
Be sure to save any changes as you work and apply number formatting for each metric as you populate the report. Follow the department formatting conventions using the short date format, rounding to whole numbers for total dollar amounts and percentages, and using two decimal places for all KPIs
{{% /notice %}}

## Begin with populating the Summary Report
1. Populate the Reporting Period Begin Date using the MIN function.
1. Populate the Reporting Period End Date using the MAX function.
1. Populate the Count of Days in Period by calculating the range between the begin and end dates.
1. Populate the Report Preparation Date using the TODAY function.
1. Use the COUNT function to populate the Total Orders cell.

{{% notice blue Note "rocket" %}}
Count either the units or dollars column to get this total since the COUNT function only works on cells populated with numeric data. This is a correct approach because there is one row per order and there aren’t nulls in these columns.
{{% /notice %}}

6. Use the SUM function to populate the Total Units cell.
7. Use the SUM function to populate the Total Sales $ cell.
8. Populate the Average Order Value (AOV) KPI using the AGGREGATE function.

{{% notice blue Note "rocket" %}}
AOV = Sales $/Orders
{{% /notice %}}

9. Populate the Average Unit Retail (AUR) KPI using cell references and a division formula.

{{% notice blue Note "rocket" %}}
AUR = Sales $/Units
{{% /notice %}}

10. Use the AVERAGE function to populate the Units Per Transaction (UPT) KPI.

{{% notice blue Note "rocket" %}}
UPT = Units/Orders
{{% /notice %}}

11. Populate the Sales Dollar amount for each Shipping Status Category by using the SUMIF formula.

{{% notice blue Note "rocket" %}}
Start by creating the function for the Cancelled status. Don’t hard-code the shipping status, use cell references. Use a mix of absolute and relative references where appropriate so that you can use the fill option to populate the values for the remaining categories.
{{% /notice %}}

12. Populate the % of Total for each Shipping Status Category using cell references and a division formula.

{{% notice blue Note "rocket" %}}
% of Total = Category Sales $/Total Sales $. Use a mix of absolute and relative references where appropriate so that you can use the fill option to populate the values for the remaining categories.
{{% /notice %}}

13. Populate the Quantity of Units for each Cancellation Status Category by using the SUMIF formula.

{{% notice blue Note "rocket" %}}
You will need to hard-code the conditions for these using logical operators equal to Cancelled (“=Cancelled”) and not equal to Cancelled (“<>Cancelled”)
{{% /notice %}}

14. Populate the % of Total for each Cancellation Status category using the same method as above.
15. Validate that your basic functions and IF functions result in accurate data. Make corrections where needed. Validate that the percentage of total values for Shipping Status and Cancellation Status sum to 100%. If they do not, add more categories and formulas as appropriate and sort section to retain original sort order. Double check all date and number formats.

{{% notice blue Note "rocket" %}}
Use the UNIQUE formula on the Shipping Status and Cancellation Status columns in the dataset to return a list of all distinct category options.
{{% /notice %}}

16. Next, populate the Sample Order Data Report.
17. Find the Top Destination Postal Code using the MODE.SINGL function.
18. For the first set of twenty provided Order IDs, populate the Date, Status, Ship Service Level, Units, Dollars, City, State, and Zip Code using the VLOOKUP function.
19. For the second set of twenty provided Order IDs, populate the Ship Service Level and Zip Code by combining the `INDEX` and `MATCH` functions.
20. Validate that your `VLOOKUP` and `INDEX/MATCH` functions are returning the correct data. Make any necessary corrections to your formulas. Double-check all formats.

## Submitting Your Work

Your director has asked that you submit the report for review as soon as you have it prepared and gave you a heads-up that added requirements will be provided as soon as the initial review is completed. You’re ready to submit this initial report, so you review the submission requirements just to be sure that you follow the specifications.

Upload the Microsoft Excel Workbook under Class 4 Exercises: Order Summary Report and click Submit.




Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions content/appendices/spreadsheet-mastery/studio/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
+++
title = "Spreadsheet Mastery: Studio"
date = 2024-01-08T10:24:35-06:00
draft = false
weight = 2
+++

The initial review of the Order Summary Report is completed and, as your director promised, additional metrics need to be included in the report. The requirements are clear, so you outline a plan for how to proceed.

## Additional Requirements:
1. Total Sales $ and Total Units for a new category that combines Fulfillment Entity and Shipping Status (Example: Amazon-Shipped)
1. The Total Order Count, Total Sales $, and Total Units for all cancelled orders greater than or equal to the AOV and all cancelled orders less than the AOV
1. The AOV for the Top Destination Zip Code
1. A count of distinct Zip Codes, Cities, and States
1. Sort the Shipping Status section of the report descending by $ Amt
1. We will be reporting this data at a standardized cadence going forward, so please keep your template and submit a static version of the Excel workbook. Include a PDF of the report pages to provide to external departments.

## Your Plan:

1. Use the `CONCAT` function to create a new variable in Column M of the dataset titled Fulfillment_Status. Separate the two variables using a single dash and use the fill option to populate every row in the dataset. Copy the column and paste over it using values-only to keep the data but remove the formulas from the dataset.
1. Use the `UNIQUE` function to return a list of the new Fulfillment Status categories
1. Update the Report Templates to include the additional requirements – it should look like these mock-ups

![Order report template updated](pictures/report-template-updated.png?classes=border)

![Shipping report updated](pictures/shipping-info-updated.png?classes=border)

4. Combine the `COUNTA` and `UNIQUE` functions into a nested function to populate the Total Cities and Total States cells

{{% notice blue Note "rocket" %}}
You need to use `COUNTA` instead of `COUNT` on these non-numeric columns
{{% /notice %}}

5. Combine the `COUNT` and `UNIQUE` functions into a nested function to populate the Total Zip Codes cell
6. Populate the Order Count in the Cancelled By Order Value section of the report using an absolute cell reference to the AOV, the `COUNTIFS` function, and the logical operators `>=` and `<`

{{% notice blue Note "rocket" %}}
Remember to use the & (ampersand) to join the logical operator and the cell reference within the formula like this so that Excel will accept the syntax (">="&$P$53). Also, fill the formula down and simply change the logical operator within the formula bar.
{{% /notice %}}

7. Populate the Sales $ and Units cells using the `SUMIFS` function and the same approach as step 6
8. Populate the Sales $ and Units in the By Fulfillment Status section of the report using the `SUMIF` function and cell references to the Fulfillment Status. Use absolute references where appropriate to allow a fill down of the formula.

{{% notice blue Note "rocket" %}}
Creating a new variable column in the dataset will save a lot of time – would have to use `SUMIFS` for each category as an alternative approach.
{{% /notice %}}

9. Using the Custom Sort option from the tool bar, sort the Shipping Status section of the report Descending by Sales $
10. Even though it isn’t specified but to maintain consistency, apply the same sort to the By Fulfillment Status section
11. On the Order Sample Data worksheet, populate the Top Destination Postal Code AOV using the `AVERAGEIF` function
12. Validate that all calculations returned correct results and double check all text and number formats. Also, double check that all shading and border formatting has been retained. Make any necessary adjustments before submission.

{{% notice blue Note "rocket" %}}
Confirm that all functions from the initial report were retained accurately as you continued to program the added requirements.
{{% /notice %}}

You have confirmed that all data and formatting is correct, and you are ready to submit the report. You know from the added requirements outline that you will need to keep a copy of this template to be used with refreshed data in the future, so you decide to proceed as follows:
- File > Save As > Order Summary Report_mm.dd.yyyy using today’s date in the file name
- Select the entire Summary Report worksheet by clicking the upper left corner of worksheet where the Columns and Rows intersect
- Copy the entire worksheet and paste values only to keep a static copy of the report but remove the functions from within the cells
- Do the same with the Order Sample Data worksheet
- Now that you’ve removed the formulas from the workbook, delete the Data worksheet
- Using the Page Layout menu option and the additional buttons on the ribbon, format each report page by Setting the Print Area to include the surrounding borders, setting the orientation to Landscape and fitting each to one-page
- Export both worksheets to a PDF by navigating to File > Export > Create PDF/XPS > Options > Entire Workbook > OK > Publish
- Verify that your PDF look as you’d expect based on your print and page layout sections
- Verify that your Excel workbook and PDF are both named Order Summary Report_mm.dd.yyyy

## Submission

Upload three documents (template workbook, static report workbook, PDF) to Canvas under Class 4 Studio: Expanded Order Summary Report and click Submit.




Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3435dcd

Please sign in to comment.