Tabellab

Project 1 · E-commerce Sales: Clean the Orders and Compute the KPIs

Lesson 1 of 20Lab

All lessons
  1. Project 1 · E-commerce Sales: Clean the Orders and Compute the KPIsLabFree
  2. Project 1 · E-commerce Sales: Monthly Trend, Top Product and the InsightLab Locked
  3. Project 2 · HR Attrition: Clean the Leaver Flags and Compare DepartmentsLab Locked
  4. Project 2 · HR Attrition: Find the Drivers and Chart ThemLab Locked
  5. Project 3 · Marketing Campaigns: Fix the Spend Column, ROAS and CPALab Locked
  6. Project 3 · Marketing Campaigns: Channel Summary, Best Channel and the ChartLab Locked
  7. Project 4 · Customer Support: Resolution Time, SLA and BacklogLab Locked
  8. Project 4 · Customer Support: Resolution-Time Histogram and the InsightLab Locked
  9. Project 5 · Customer Data Audit: Duplicates, Blanks and Invalid EmailsLab Locked
  10. Project 5 · Join the Product Master: Categories, Gross Profit and Missing SKUsLab Locked
  11. Project 6 · Repeat Customers: Orders per Customer and the Repeat RateLab Locked
  12. Project 6 · Customer Segments: Recency, Frequency and a Segment ChartLab Locked
  13. Project 7 · Inventory Health: Days of Cover, Reorder Points and Red FlagsLab Locked
  14. Project 7 · ABC Analysis: Cumulative Share, Product Classes and a Pareto ChartLab Locked
  15. Project 8 · Website Funnel: Step Conversion by Device and the Biggest Drop-offLab Locked
  16. Project 8 · Year over Year: Growth by Month, Moving Average and SeasonalityLab Locked
  17. Project 9 · Delivery Performance: Delay Days and On-Time Rate by CarrierLab Locked
  18. Project 9 · Customer Ratings: Satisfaction Share, Late vs On Time and CORRELLab Locked
  19. Project 10 · Simple Forecast: Trend Line, Next Quarter and a Sanity CheckLab Locked
  20. Capstone Project · Kestrel KPI Dashboard: Monthly Scorecard, Targets and ChartLab Locked

You are not signed in — the lab works, but your progress is not saved. Sign up

Lesson 1 of 20 is free. Unlock all 20 hands-on labs, the final exam and your certificate.

Buy course — $9.90
Read first

How to turn these labs into portfolio pieces

  • Each project follows the same steps hiring managers look for: question → data → cleaning → analysis → chart → insight → recommendation.
  • Keep the raw data on one sheet and your cleaned columns next to it, so a reviewer can follow every step. Never overwrite the raw values.
  • Write a short README for each project: the business question, the data (rows, columns, period), the cleaning steps, the KPIs with their formulas, one chart and two or three sentences of insight with numbers.
  • Rebuild the project in your own Excel or Google Sheets file and publish it with your README. The data here is fictional, so you may share it freely.

Project 1 brief

Kestrel's manager asks: How much did the shop really earn in Q1, what is a typical order worth, and how many orders come back? You get 20 orders from January to March as exported from the shop system.

Loading the spreadsheet…

Why a portfolio project beats another certificate

If you want a job as a data analyst, the question you will hear most often is not "Can you write a formula?" but "Show me something you have analysed." A portfolio answers that question before it is asked. It shows a hiring manager that you can take a messy business question, work through real-looking data and finish with a clear insight. This free first lesson of Data Analyst Portfolio Projects in Excel starts your first portfolio project and explains how to turn it into a piece you can actually show.

The course is for career changers and junior analysts, students who want something concrete for their CV, and people who already work with Excel in sales, finance or operations and want to prove analytical skills. You need basic Excel: entering formulas, copying them down and using simple functions such as SUM. Everything else is explained in the labs.

All four projects use the same fictional company, Kestrel Outdoor Gear, an online shop for hiking and camping gear. Project 1 looks at sales, project 2 at staff attrition, project 3 at marketing campaigns and project 4 at customer support. Each project has two labs: the first one cleans and analyses the data, the second one finds the insight and charts it. This first lab is the cleaning and KPI half of the e-commerce project.

The business question and the raw data

Kestrel's manager asks three simple questions: How much did the shop really earn in Q1? What is a typical order worth? How many orders come back? You receive the raw export of 20 orders from January to March. It looks harmless, but it has the problems every real export has.

  • Inconsistent product names. The same product appears as "Trail Backpack", "Trail  Backpack", "TRAIL BACKPACK " and "trail Backpack". A pivot table or SUMIF would treat them as different products.
  • Hidden spaces. Some names start with a space, some end with one, and "  rain   jacket " has spaces everywhere. You cannot see trailing spaces in a cell, but Excel compares them character by character.
  • Inconsistent status values. "Completed", "completed", "COMPLETED" and "completed " (with a trailing space) all mean the same thing. Returned and cancelled orders are mixed in.
  • Revenue that is not revenue. Quantity times price is only earned for completed orders. Returned and cancelled orders must count as zero.

These issues are deliberately small so that you can see each one, but they are exactly the kind of issue that makes real reports wrong. A shop system, a CRM or a spreadsheet filled in by several people will produce the same mess at a much larger scale.

The core idea: clean next to the raw data, then calculate

Data cleaning in Excel usually means building clean helper columns next to the raw data, not editing the raw cells. You keep the export untouched in columns A to F and add the cleaned product name in column G and the net revenue in column H. A reviewer can then follow each step, and if the raw data is updated, the formulas recalculate.

Two functions do most of the text cleaning. TRIM removes spaces at the start and end of a text and reduces every run of spaces inside it to a single space. PROPER capitalises the first letter of every word and lowercases the rest. Combined as =PROPER(TRIM(C2)), they give every product one spelling. The order does not matter much here, but trimming first is a good habit.

For the status, you do not even need a clean column. The comparison TRIM(F2)="Completed" is enough, because Excel's = operator ignores upper and lower case. "COMPLETED" equals "Completed", but "completed " with a trailing space does not, which is why TRIM is needed. The revenue formula then reads: if the trimmed status is Completed, quantity times price, otherwise zero.

With clean columns in place, the three KPIs follow. Net revenue is the sum of column H. Average order value (AOV) is net revenue divided by the number of completed orders, because cancelled and returned orders did not earn anything and would drag the average down. Return rate is returned orders divided by all orders. Note the different denominators: AOV is about the orders that earned money, the return rate is about all orders placed. In a portfolio README, you should always state which definition you used, because companies define these KPIs differently.

Worked example: Kestrel's Q1 orders

Here are all 20 orders with the raw values and the two clean columns. Dots (·) show where the raw text has spaces, so you can see the problems that are invisible in a normal cell. Prices are in dollars; the data is fictional.

OrderDateProduct (raw)QtyPriceStatus (raw)Product (G)Net revenue (H)
K-200105 Jan"Trail·Backpack"1$89.00"Completed"Trail Backpack$89.00
K-200207 Jan"camp·stove"2$54.50"completed"Camp Stove$109.00
K-200309 Jan"·Rain·Jacket"1$129.00"Completed"Rain Jacket$129.00
K-200412 Jan"HIKING·POLES"2$39.90"Returned"Hiking Poles$0.00
K-200515 Jan"water·filter·"3$34.00"Completed"Water Filter$102.00
K-200619 Jan"Trail··Backpack"1$89.00"COMPLETED"Trail Backpack$89.00
K-200723 Jan"rain·jacket"1$129.00"Cancelled"Rain Jacket$0.00
K-200827 Jan"Camp·Stove"1$54.50"Completed"Camp Stove$54.50
K-200902 Feb"hiking·poles"1$39.90"Completed"Hiking Poles$39.90
K-201006 Feb"TRAIL·BACKPACK·"2$89.00"Completed"Trail Backpack$178.00
K-201110 Feb"Water·Filter"2$34.00"Returned"Water Filter$0.00
K-201214 Feb"rain·JACKET"1$129.00"Completed"Rain Jacket$129.00
K-201318 Feb"camp··stove"1$54.50"completed·"Camp Stove$54.50
K-201422 Feb"·Hiking·Poles"2$39.90"Completed"Hiking Poles$79.80
K-201526 Feb"trail·backpack"1$89.00"Cancelled"Trail Backpack$0.00
K-201603 Mar"Rain·Jacket·"2$129.00"Completed"Rain Jacket$258.00
K-201708 Mar"WATER·FILTER"1$34.00"Completed"Water Filter$34.00
K-201813 Mar"Camp·stove"2$54.50"Returned"Camp Stove$0.00
K-201918 Mar"trail·Backpack"1$89.00"Completed"Trail Backpack$89.00
K-202024 Mar"··rain···jacket·"1$129.00"completed·"Rain Jacket$129.00
Total$1,563.70

Net revenue for Q1 is $1,563.70 from 15 completed orders. Two orders were cancelled (K-2007 and K-2015) and three were returned (K-2004, K-2011 and K-2018). By month, revenue was $572.50 in January, $481.20 in February and $510.00 in March, which you will analyse in the next lab. The formulas behind the result are:

CellWhat it calculatesFormulaResult
G2Clean product name, row 2=PROPER(TRIM(C2))Trail Backpack
G21Clean product name, last row=PROPER(TRIM(C21))Rain Jacket
H2Net revenue, completed orders only=IF(TRIM(F2)="Completed",D2*E2,0)$89.00
H14Status "completed " with trailing space=IF(TRIM(F14)="Completed",D14*E14,0)$54.50
H23Net revenue=SUM(H2:H21)$1,563.70
H24Average order value=H23/COUNTIF(H2:H21,">0")$104.25
H25Return rate=COUNTIF(F2:F21,"Returned")/COUNTA(A2:A21)15%

The average order value is $1,563.70 ÷ 15 = $104.25. If you divided by all 20 orders, you would get $78.19, a number that is a quarter lower and wrong for its purpose. The return rate is 3 ÷ 20 = 15%. The lab also accepts a SUMPRODUCT version of the AOV that needs no helper column: =SUMPRODUCT((TRIM(F2:F21)="Completed")*D2:D21*E2:E21)/SUMPRODUCT((TRIM(F2:F21)="Completed")*1). The first part adds quantity times price for completed rows, the second counts those rows.

One detail is worth knowing: COUNTIF(F2:F21,"Returned") works for the return rate because all "Returned" values happen to be spelled without extra spaces. In a larger export you would protect yourself with =SUMPRODUCT((TRIM(F2:F21)="Returned")*1), which trims every status before comparing. When you write up the project, mentioning that kind of check is exactly what makes a reviewer trust your numbers.

15 of 20 orders were completed, 3 came back0510152015Completed3Returned2CancelledNet revenue$1,563.70SUM of column HAverage order value$104.25$1,563.70 / 15 completedReturn rate15%3 returned / 20 ordersCounts per status after TRIM; the KPIs are the three numbers the lab asks for.
The status column decides everything: only the 15 completed orders bring revenue and count for the average order value, while the return rate uses all 20 orders.

Once the names are clean, you can also group revenue by product with =SUMIF(G2:G21,"Rain Jacket",H2:H21) or a pivot table. Rain jackets are the clear leader: $645 of $1,563.70, or 41% of net revenue. This is not part of the first lab, but it shows why the cleaning matters: grouping on the raw column C would split the jacket revenue across four different spellings.

Rain jackets earned 41% of Q1 net revenue$0$100$200$300$400$500$600$700Rain Jacket$645.00Trail Backpack$445.00Camp Stove$218.00Water Filter$136.00Hiking Poles$119.70Kestrel Outdoor Gear (fictional), completed orders only, Jan-Mar 2026
Once the product names are cleaned, revenue can be grouped by product. Without TRIM and PROPER, the five products would appear as 20 different spellings, one for every order and this chart would be impossible.

Step by step: clean the export and compute the KPIs in Excel

The steps below rebuild the lab in your own workbook. They are written for Excel 365 on Windows and work the same way in Excel 2019, Excel for Mac and, with small menu differences, in Google Sheets.

  1. Keep the raw data. Paste the export into a sheet called Raw or keep it in columns A to F and never type over it. Add the headers Product in G1 and Net revenue in H1.
  2. Clean the product name. In G2 type =PROPER(TRIM(C2)) and press Enter. Select G2 and double-click the fill handle to copy the formula down to G21.
  3. Calculate net revenue. In H2 type =IF(TRIM(F2)="Completed",D2*E2,0) and copy it down to H21. Format H2:H21 as currency with Home > Number > Accounting or Ctrl+Shift+$ (US format).
  4. Check the cleaning. Select G2:G21 and look at Data > Sort & Filter > Filter, then open the filter in G1: you should see exactly five products. Do the same with a temporary column =TRIM(F2) to see the three statuses.
  5. Total revenue. In H23 type =SUM(H2:H21), or select H23 and press Alt+= for AutoSum.
  6. Average order value. In H24 type =H23/COUNTIF(H2:H21,">0"). This divides by the number of rows with revenue, which are exactly the completed orders in this data.
  7. Return rate. In H25 type =COUNTIF(F2:F21,"Returned")/COUNTA(A2:A21) and format it as a percentage with Ctrl+Shift+%.
  8. Cross-check. Count the statuses: completed + returned + cancelled must equal 20. A quick check cell such as =SUMPRODUCT((TRIM(F2:F21)="Completed")*1)+COUNTIF(F2:F21,"Returned")+COUNTIF(F2:F21,"Cancelled") should return 20.
  9. Document. Add a short note next to the KPIs that states each definition, for example "AOV = net revenue / completed orders". This becomes part of your README.
To find hidden spaces quickly, add a temporary column with =LEN(C2)-LEN(TRIM(C2)). Any value above zero means the raw text has extra spaces.

Turning the lab into a portfolio piece

A lab exercise becomes a portfolio piece when someone else can understand it without you in the room. Reviewers usually spend a few minutes on a project, so make those minutes count. Each project in this course follows the same seven steps, and the README is where you show the parts the formulas cannot: the question, the data and your recommendation.

The seven steps a reviewer looks forQuestionDataCleaningAnalysisChartInsightAdviceLab 1 (this lesson)Lab 2 (next lesson)Question, data and advice go into your README; the labs train the technical middle.
Every project in the course follows the same seven steps. In this first lab you clean the raw export and compute the KPIs; the second lab of each project adds the chart and the insight.

  • Question. One or two sentences: what did the business want to know, and why does it matter?
  • Data. Number of rows and columns, period covered, source (here: a fictional shop export), and the known quality problems.
  • Cleaning. A short list of the problems and the formula that fixed each one. Show the raw and clean columns side by side.
  • Analysis. The KPIs with their definitions and formulas, for example AOV = net revenue ÷ completed orders.
  • Chart and insight. One chart and two or three sentences with numbers, such as "Rain jackets earned 41% of Q1 net revenue."
  • Recommendation. What should the business do next, and what data would you need to be more certain?

Since the data in this course is fictional, you may share your rebuilt workbook and README publicly, for example on GitHub, a personal website or LinkedIn. Never publish real company or customer data in a portfolio, even if it seems harmless.

Data analyst portfolio projects in Excel: cleaning raw order data, KPIs and charts for four business cases
Four projects, 20 labs: sales, HR attrition, marketing and customer support, each with cleaning, KPIs, a chart and an insight you can put into your portfolio.

Common mistakes and how to spot them

  • Using PROPER without TRIM. The capitals are fixed, but " Rain Jacket" and "Rain Jacket" are still different. Spot it with a filter on the clean column: if a product appears twice, spaces are left.
  • Comparing the raw status. =IF(F2="Completed",…) fails for "completed " with a trailing space and silently drops revenue. If your total is lower than expected, compare LEN(F2) with LEN(TRIM(F2)).
  • Dividing AOV by all orders. Dividing $1,563.70 by 20 gives $78.19 instead of $104.25. If your average is lower than most individual order values, check the denominator.
  • Dividing the return rate by completed orders. 3 ÷ 15 = 20% is a different metric. Pick one definition, state it in the README and use it consistently.
  • Overwriting the raw data. Cleaning in place with Find & Replace destroys the evidence. A reviewer can no longer see what you changed, and you cannot redo the work when new data arrives.
  • Counting cancelled orders as revenue. Quantity times price for every row gives $2,038.50, which is the value of all orders placed, not money earned. Label such a number "gross order value" if you show it at all.
  • Mixing text and numbers. If a price was exported as text, D2*E2 may still work but SUM ignores text values. Lesson 5 of the course shows how to repair such a column.

Quick reference: functions and shortcuts used

All functions and shortcuts used in this lesson.

Function / shortcutWhat it does hereExample
TRIMRemoves leading and trailing spaces and reduces inner runs of spaces to one=TRIM(" rain jacket ") → "rain jacket"
PROPERCapitalises the first letter of each word=PROPER("HIKING POLES") → "Hiking Poles"
IFReturns revenue only for completed orders=IF(TRIM(F2)="Completed",D2*E2,0)
SUMTotals net revenue=SUM(H2:H21)
COUNTIFCounts rows that meet one condition=COUNTIF(H2:H21,">0")
COUNTACounts non-empty cells, here all orders=COUNTA(A2:A21)
SUMPRODUCTRevenue or counts with a condition in one formula, no helper column=SUMPRODUCT((TRIM(F2:F21)="Completed")*D2:D21*E2:E21)
SUMIFRevenue per product from the clean column=SUMIF(G2:G21,"Rain Jacket",H2:H21)
Ctrl+D / double-click fill handleCopies a formula down a columnFill G2:H21
Ctrl+Shift+V or Paste Special > ValuesTurns cleaned formulas into fixed text (keep raw data separately)Optional final step

Real-world uses

  • Monthly e-commerce reporting. Shop exports from most platforms need exactly this cleaning before revenue, AOV and return rate can be reported.
  • CRM and sales pipeline data. Company names, sales rep names and deal stages typed by hand have the same spacing and capitalisation problems. TRIM and PROPER fix most of them before you build a pivot table.
  • Survey analysis. Free-text answers such as country or department names must be standardised before you can count them.
  • Returns analysis. Operations teams track return rates by product and month to find quality problems; the definition used here is a common starting point.
  • Job interviews and case studies. Many analyst interviews include a short take-home task with messy data. The workflow of raw columns, clean helper columns and documented KPIs is exactly what reviewers want to see.

What you will build in the rest of this course

Lesson 1 is free. The remaining 19 lessons are part of the paid course ($9.90 one-time). Each lab uses Kestrel data, has a Coach that checks your formulas and charts, and adds one more piece to your portfolio.

Project 1 · E-commerce Sales: Monthly Trend, Top Product and the Insight. You summarise six months of cleaned orders by month and by product, chart the trend and write the main insight with its number. This completes your first portfolio project from raw export to a finding a manager can act on.

Project 2 · HR Attrition: Clean the Leaver Flags and Compare Departments. You turn messy Yes/No answers into a 1/0 leaver flag and calculate Kestrel's attrition rate overall, by department and the average tenure of leavers. HR data is common in analyst interviews, and this lab shows how to handle it carefully.

Project 2 · HR Attrition: Find the Drivers and Chart Them. You compare attrition for employees with and without overtime, with low and high satisfaction and with short and long tenure, chart the groups and name the strongest driver.

Project 3 · Marketing Campaigns: Fix the Spend Column, ROAS and CPA. You repair a spend column that was exported as text, then calculate return on ad spend and cost per acquisition for 16 campaigns and the blended ROAS of the whole budget.

Project 3 · Marketing Campaigns: Channel Summary, Best Channel and the Chart. You roll the campaigns up into five channels, rank them in a sorted bar chart and state which channel earns back its budget best, the kind of recommendation marketing teams ask analysts for.

Project 4 · Customer Support: Resolution Time, SLA and Backlog. You turn opened and resolved timestamps into resolution hours, check each ticket against its priority's service level and report the SLA rate and the open backlog. Date and time arithmetic is a skill many applicants lack.

Project 4 · Customer Support: Resolution-Time Histogram and the Insight. You bin the resolution times, compare median and mean, draw a histogram and state how quickly most customers get an answer. It finishes the course with a project that shows statistical thinking, not only formulas.

Summary

Real data is messy, and the first job of an analyst is to make it trustworthy without hiding what was changed. Keep the raw export, add clean helper columns with =PROPER(TRIM(C2)) and =IF(TRIM(F2)="Completed",D2*E2,0), and only then compute the KPIs. For Kestrel's Q1 that gives net revenue of $1,563.70, an average order value of $104.25 and a return rate of 15%. Write down your definitions, and the lab becomes the first piece of your portfolio.

Now scroll up and do the lab: clean the product names in column G, calculate net revenue in column H, then the average order value and the return rate. The Coach checks each cell and tells you exactly which space or denominator went wrong.

Frequently asked questions

What projects should a data analyst portfolio include?

Three or four projects from different business areas, for example sales, HR, marketing and customer support. Each should show cleaning, analysis, one clear chart and a written insight with numbers.

Can I build a data analyst portfolio with only Excel?

Yes. Excel is used for analysis in most companies, and well-documented Excel projects show cleaning, formulas, KPIs and charts. You can add SQL or Python projects later.

How do I remove extra spaces in Excel?

Use =TRIM(A2). It removes leading and trailing spaces and reduces runs of spaces inside the text to one. Combine it with PROPER, UPPER or LOWER to fix capitals too.

How do you calculate average order value in Excel?

Divide net revenue by the number of completed orders, for example =H23/COUNTIF(H2:H21,">0"). Do not divide by all orders if cancelled or returned orders have no revenue.

How do I calculate a return rate in Excel?

Count the returned orders and divide by all orders, for example =COUNTIF(F2:F21,"Returned")/COUNTA(A2:A21), then format as a percentage. State the definition, since some companies divide by completed orders instead.

Where should I publish my data analyst portfolio?

Common choices are GitHub, a simple personal website or LinkedIn posts with the workbook and a short README. Only publish fictional or public data, never real company or customer data.

Keep going: Data Analyst Portfolio Projects in Excel

This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time $9.90.

  1. Project 1 · E-commerce Sales: Monthly Trend, Top Product and the Insight
  2. Project 2 · HR Attrition: Clean the Leaver Flags and Compare Departments
  3. Project 2 · HR Attrition: Find the Drivers and Chart Them
  4. Project 3 · Marketing Campaigns: Fix the Spend Column, ROAS and CPA
  5. Project 3 · Marketing Campaigns: Channel Summary, Best Channel and the Chart
  6. Project 4 · Customer Support: Resolution Time, SLA and Backlog
  7. Project 4 · Customer Support: Resolution-Time Histogram and the Insight
  8. Project 5 · Customer Data Audit: Duplicates, Blanks and Invalid Emails
  9. Project 5 · Join the Product Master: Categories, Gross Profit and Missing SKUs
  10. Project 6 · Repeat Customers: Orders per Customer and the Repeat Rate
  11. Project 6 · Customer Segments: Recency, Frequency and a Segment Chart
  12. Project 7 · Inventory Health: Days of Cover, Reorder Points and Red Flags
  13. Project 7 · ABC Analysis: Cumulative Share, Product Classes and a Pareto Chart
  14. Project 8 · Website Funnel: Step Conversion by Device and the Biggest Drop-off
  15. Project 8 · Year over Year: Growth by Month, Moving Average and Seasonality
  16. Project 9 · Delivery Performance: Delay Days and On-Time Rate by Carrier
  17. Project 9 · Customer Ratings: Satisfaction Share, Late vs On Time and CORREL
  18. Project 10 · Simple Forecast: Trend Line, Next Quarter and a Sanity Check
  19. Capstone Project · Kestrel KPI Dashboard: Monthly Scorecard, Targets and Chart

Buy course — $9.90 See the full course