0
0
Tableaubi_tool~15 mins

Line charts in Tableau - Real Business Scenario

Choose your learning style9 modes available
Scenario Mode
👤 Your Role: You are a sales analyst at a retail company.
📋 Request: Your manager wants to see how monthly sales have changed over the past year to understand trends and seasonality.
📊 Data: You have a dataset with sales transactions including Date, Product Category, and Sales Amount.
🎯 Deliverable: Create a line chart showing total sales for each month over the last 12 months.
Progress0 / 8 steps
Sample Data
DateProduct CategorySales Amount
2023-07-15Electronics1200
2023-07-20Clothing800
2023-08-05Electronics1500
2023-08-18Clothing700
2023-09-10Electronics1300
2023-09-22Clothing900
2023-10-03Electronics1600
2023-10-15Clothing850
2023-11-07Electronics1700
2023-11-20Clothing950
2023-12-01Electronics1800
2023-12-12Clothing1000
1
Step 1: Connect your Tableau workbook to the sales data source containing Date, Product Category, and Sales Amount columns.
No formula needed; just connect the data source.
Expected Result
Data source is connected and visible in Tableau.
2
Step 2: Create a calculated field to extract the month and year from the Date column for grouping sales by month.
Create calculated field named 'MonthYear' with formula: DATETRUNC('month', [Date])
Expected Result
A new field 'MonthYear' that shows the first day of each month for each date.
3
Step 3: Drag 'MonthYear' to the Columns shelf to set the horizontal axis as months.
Drag 'MonthYear' field to Columns.
Expected Result
Months appear on the horizontal axis in chronological order.
4
Step 4: Drag 'Sales Amount' to the Rows shelf to set the vertical axis as total sales.
Drag 'Sales Amount' field to Rows and ensure aggregation is SUM.
Expected Result
Vertical axis shows total sales amount for each month.
5
Step 5: Change the mark type to 'Line' to create a line chart showing sales trends over time.
In Marks card, select 'Line' as the mark type.
Expected Result
A line chart appears showing total sales for each month connected by lines.
6
Step 6: Add tooltips to show exact sales values when hovering over points on the line.
Ensure 'Sales Amount' is in Tooltip shelf.
Expected Result
Hovering over any point on the line shows the total sales for that month.
7
Step 7: Format the x-axis to show month names and year for clarity.
Right-click 'MonthYear' axis, select Format, set date format to 'MMM yyyy'.
Expected Result
X-axis labels show months like 'Jul 2023', 'Aug 2023', etc.
8
Step 8: Add a chart title 'Monthly Sales Trend - Last 12 Months' and ensure the chart is clear and readable.
Double-click title area and type the title.
Expected Result
Chart has a clear title describing the data shown.
Final Result
Monthly Sales Trend - Last 12 Months

Jul 2023 |─────●─────
Aug 2023 |       ●───
Sep 2023 |        ●──
Oct 2023 |         ●─
Nov 2023 |          ●
Dec 2023 |           ●

Y-axis: Total Sales Amount
X-axis: Month-Year
Sales show an increasing trend from July to December 2023.
December has the highest sales, likely due to holiday shopping.
There is a steady rise in Electronics sales contributing to overall growth.
Bonus Challenge

Create a line chart that compares monthly sales trends for Electronics and Clothing categories side by side.

Show Hint
Use 'Product Category' as a color or detail field in the line chart to show separate lines for each category.