📥 Data Sources
This assignment uses two related tables that you'll join in Tableau:
⬇ Customers (.csv) ⬇ Orders (.csv)
Customers: 200 customers with ID, Name, City, State, Region, Tier, Signup Date.
Orders: ~1,470 orders over 2 years with Customer ID, Product, Product Category, Channel, Quantity, Amount.
Join on Customer ID.
📋 Assignment Instructions
Create a Tableau workbook that uses parameters and LOD expressions to enable flexible analysis.
Part 1: Data Setup
- Connect both CSVs — join Customers and Orders on
Customer ID(left join from Customers). - Verify the join — check that customers without orders appear as nulls (they should — not all 200 customers have orders every month).
Part 2: Parameters (minimum 2)
- Metric Selector Parameter — create a string parameter with allowed values: "Revenue", "Orders", "Avg Order Value". Then create a calculated field that switches the measure based on the parameter:
CASE [Metric Selector] WHEN "Revenue" THEN SUM([Amount]) WHEN "Orders" THEN COUNTD([Order ID]) WHEN "Avg Order Value" THEN SUM([Amount]) / COUNTD([Order ID]) END
Use this in a line chart so the user can toggle which metric to view over time. - Top N Parameter — create an integer parameter (range 5–50, step 5). Use it with a RANK() calculation to show only the Top N customers by total spend:
IF RANK(SUM([Amount])) <= [Top N Parameter] THEN 'Show' ELSE 'Hide' END
Filter the view to "Show" and display in a bar chart.
Part 3: LOD Expressions (minimum 3)
💡 Step-by-step guide for the LOD exercises below:
LOD expressions use curly braces { } and the syntax { FIXED [Dimension] : AGG([Measure]) }. They compute values at a different granularity than your current view. Start each exercise by creating a new Calculated Field (right-click in the Data Pane → Create Calculated Field).
- Customer Lifetime Value — use a FIXED LOD to calculate each customer's total spend regardless of filters:
{ FIXED [Customer ID] : SUM([Amount]) }Show the distribution of CLV in a histogram. - First Purchase Date — use FIXED LOD to find each customer's first order date:
{ FIXED [Customer ID] : MIN([Order Date]) }Create a "Customer Cohort" calculated field from this using:DATETRUNC('month', [First Purchase Date]). This gives you the year-month of each customer's first purchase.
To build the cohort heat map:- Drag [Customer Cohort] to Rows
- Drag [Order Date] (as discrete month) to Columns
- Drag COUNTD([Customer ID]) to the Color mark
- Change the chart type to a highlight table or square marks
- Customer vs Average Comparison — use a FIXED LOD to calculate each customer's regional average spend:
{ FIXED [Region] : AVG([Amount]) }Compare this to each customer's individual total spend. Color a scatter plot to show above/below average customers.
✅ Submission Checklist
- Two data sources joined on Customer ID
- Metric Selector parameter with dynamic calculated field
- Top N parameter (RANK-based) controlling a bar chart
- 3 FIXED LOD expressions (CLV, First Purchase Date, regional comparison)
Export your workbook as a .twbx (packaged workbook) and upload using the form below.