E-Commerce Sales and Product Analysis in Tableau – Complete Detailed Notes
Course: Tableau Training | Topic: E-Commerce Sales and Product Analysis | Level: Beginner to Advanced
Learn Tableau: JustAcademy Tableau Training | Register for a Tableau Course Demo
1. Introduction to E-Commerce Sales and Product Analysis
E-Commerce Sales and Product Analysis is the process of collecting, organizing, analyzing, and visualizing online business data to understand sales performance, product demand, customer purchasing behavior, revenue trends, profitability, and inventory movement. It helps businesses determine which products generate the most revenue, which categories perform well, which sales channels attract customers, and where improvements are needed.
E-commerce businesses generate large amounts of data through online orders, product catalogs, payment transactions, discounts, customer interactions, returns, and inventory systems. Analyzing this data manually can be time-consuming and may make it difficult to identify trends. Tableau helps transform these datasets into interactive dashboards, charts, reports, and visual summaries.
For example, an online store may sell electronics, clothing, home appliances, books, and accessories. Management wants to know which category generates the highest revenue, which products have the highest profit margins, how monthly sales are changing, and whether discounts are affecting profitability. Tableau can help answer these questions by connecting to structured sales data and presenting the results visually.
In this project, learners will understand how to connect e-commerce datasets, prepare sales data, calculate important business metrics, create product-level visualizations, and build an interactive E-Commerce Sales and Product Analysis Dashboard.
2. Learning Objectives
- Understand the fundamentals of e-commerce sales analytics.
- Learn how Tableau supports sales and product performance analysis.
- Identify important sales, product, order, and profitability metrics.
- Connect Tableau to Excel, CSV, and database sources.
- Clean and prepare e-commerce data for visualization.
- Understand dimensions, measures, data types, and data relationships.
- Create calculated fields for revenue, profit, average order value, and profit margin.
- Analyze sales by product, category, region, and time period.
- Identify best-selling and underperforming products.
- Build charts for sales trends, category comparisons, and product profitability.
- Develop interactive dashboards using filters, parameters, and actions.
- Interpret sales and product patterns for business decision-making.
- Validate dashboard results and apply visualization best practices.
- Complete a practical E-Commerce Sales and Product Analysis project.
3. What Is E-Commerce Analytics?
E-Commerce Analytics is the practice of analyzing data generated by online shopping activities. It helps businesses understand how products sell, how customers purchase, how revenue changes over time, and how operational or marketing decisions influence business outcomes.
Analytics can be applied to several areas, including sales performance, product demand, customer segmentation, website conversion, order fulfillment, returns, marketing effectiveness, inventory planning, and profitability.
3.1 Main Types of E-Commerce Analytics
| Analytics Type |
Description |
Example |
| Sales Analytics |
Measures revenue, order volume, and sales trends. |
Monthly sales by category. |
| Product Analytics |
Examines individual product and category performance. |
Top-selling products by quantity. |
| Customer Analytics |
Studies customer purchasing patterns. |
Repeat purchase rate by customer group. |
| Profitability Analytics |
Measures profit and profit margin. |
Comparing the profitability of product categories. |
| Marketing Analytics |
Evaluates marketing campaign outcomes. |
Revenue and conversion by campaign. |
| Inventory Analytics |
Studies product availability and stock movement. |
Identifying products with low inventory. |
| Returns Analytics |
Examines returned orders and products. |
Return rate by product category. |
4. What Is Product Analysis?
Product Analysis is the process of evaluating how individual products and product categories perform in a business. It includes analyzing units sold, revenue, profit, average selling price, discounts, returns, and product demand.
Product analysis helps businesses decide which products to promote, which products need pricing changes, which categories require inventory planning, and which items may need further investigation due to low sales or profitability.
4.1 Important Product Analysis Questions
- Which products generate the highest revenue?
- Which products sell the largest number of units?
- Which product categories generate the highest profit?
- Which products have low or negative profitability?
- Which products receive the highest discounts?
- How do product sales change month by month?
- Which regions generate the most revenue for each category?
- Which products have high return rates?
- Are sales concentrated in a small number of products?
- Which products may require pricing, promotion, or inventory review?
5. Business Scenario
Consider an online retail company that sells electronics, clothing, furniture, kitchen products, books, and accessories. The business receives thousands of orders from customers across different cities and regions.
The sales team uses spreadsheets to track orders, while the product team maintains a separate product catalog. Management wants one dashboard to understand overall revenue, profit, order volume, product demand, and category performance.
The company decides to use Tableau to combine the relevant sales and product information into a visual analytics solution.
| Business Requirement |
Tableau Solution |
| Monitor overall sales |
Total revenue KPI card. |
| Understand order activity |
Distinct order count and order trend. |
| Identify best-selling products |
Top products by units sold. |
| Compare product categories |
Category-wise sales and profit charts. |
| Measure profitability |
Total profit and profit margin calculations. |
| Analyze regional performance |
Geographic sales visualization. |
| Monitor monthly performance |
Monthly revenue and profit trend charts. |
| Evaluate discounts |
Discount and profitability comparisons. |
| Understand returns |
Return rate by product and category, if return data is available. |
| Support business decisions |
Interactive dashboard with filters and drill-downs. |
6. Tools and Technologies Required
| Tool |
Purpose |
| Tableau Desktop |
Create worksheets, calculated fields, charts, and dashboards. |
| Microsoft Excel |
Store, review, and prepare sales datasets. |
| CSV Files |
Import orders, products, and customer records. |
| SQL Database |
Retrieve sales data from a relational database. |
| Tableau Prep (Optional) |
Clean, combine, and reshape data before analysis. |
| Tableau Server or Tableau Cloud (Optional) |
Publish and share dashboards with authorized users. |
7. Understanding the E-Commerce Dataset
Before building a dashboard, it is important to understand the structure of the source data. E-commerce data may be stored in one large sales table or split into related tables such as Orders, Order Items, Products, Customers, Returns, and Inventory.
The analyst should determine what one row represents. For example, an order-item table typically contains one row per product line within an order. An order containing three different products may therefore appear as three rows. This distinction is important when calculating order counts and revenue.
7.1 Sales or Order Items Dataset
| Field |
Data Type |
Description |
| Order ID |
String |
Unique identifier for an order. |
| Order Date |
Date |
Date on which the order was placed. |
| Order Item ID |
String |
Identifier for an individual line item, if available. |
| Product ID |
String |
Identifier for the product sold. |
| Customer ID |
String |
Identifier for the customer who placed the order. |
| Quantity |
Number |
Number of units purchased in the line item. |
| Unit Price |
Number |
Price per unit before or after discounts, depending on the source definition. |
| Discount Amount |
Number |
Discount applied to the order line. |
| Sales Amount |
Number |
Recorded sales value for the line item. |
| Cost Amount |
Number |
Product cost associated with the line item. |
| Shipping Cost |
Number |
Shipping cost, if available. |
| Order Status |
String |
Pending, completed, cancelled, returned, or another defined status. |
7.2 Product Dataset
| Field |
Description |
| Product ID |
Unique product identifier. |
| Product Name |
Name of the product. |
| Category |
Main product category. |
| Subcategory |
More specific product grouping. |
| Brand |
Product brand or manufacturer. |
| List Price |
Published product price, if available. |
| Product Cost |
Cost of acquiring or producing the product. |
| Supplier |
Supplier identifier or name, if available. |
| Product Status |
Active, discontinued, or another catalog status. |
7.3 Customer Dataset
| Field |
Description |
| Customer ID |
Unique customer identifier. |
| Customer Segment |
Customer group defined by the business. |
| City |
Customer city, if available. |
| State or Region |
Geographic area associated with the customer. |
| Country |
Customer country. |
| Registration Date |
Date the customer registered, if tracked. |
| Acquisition Channel |
Channel through which the customer was acquired, if available. |
7.4 Returns Dataset
| Field |
Description |
| Return ID |
Unique return transaction identifier. |
| Order ID |
Associated order identifier. |
| Order Item ID or Product ID |
Identifies the returned item, depending on the data model. |
| Return Date |
Date the return was recorded. |
| Return Quantity |
Number of units returned. |
| Return Reason |
Reason recorded for the return. |
| Refund Amount |
Amount refunded, if available. |
7.5 Example Sales Dataset
| Order ID |
Order Date |
Product |
Category |
Quantity |
Sales Amount |
Cost Amount |
| ORD101 |
2026-01-05 |
Wireless Mouse |
Electronics |
2 |
1600 |
1000 |
| ORD102 |
2026-01-07 |
Office Chair |
Furniture |
1 |
6500 |
4800 |
| ORD103 |
2026-01-09 |
Notebook Set |
Stationery |
3 |
900 |
450 |
| ORD104 |
2026-01-12 |
Bluetooth Speaker |
Electronics |
1 |
2400 |
1700 |
| ORD105 |
2026-01-15 |
Travel Backpack |
Accessories |
2 |
3000 |
1900 |
| ORD106 |
2026-02-02 |
Wireless Mouse |
Electronics |
1 |
800 |
500 |
Note: The example values are illustrative and use an unspecified currency. Confirm the currency, tax treatment, discount treatment, shipping treatment, and sales recognition rules in the real dataset before calculating business KPIs.
8. Step 1: Connect Tableau to E-Commerce Data
- Open Tableau Desktop.
- Under Connect, select Microsoft Excel, Text File, or the relevant database connector.
- Select the e-commerce sales file or database.
- Inspect the tables and field names in the Data Source tab.
- Check whether Order Date is recognized as a date.
- Confirm that Quantity, Unit Price, Sales Amount, and Cost Amount have numeric data types.
- Set Order ID, Product ID, Customer ID, and Order Item ID to suitable identifier types, usually String.
- Review null values, duplicate records, and inconsistent categories.
- Confirm whether cancelled orders and returns should be excluded, separately analyzed, or represented through adjustments.
- Open a worksheet and verify basic row counts, order counts, and sales totals.
8.1 Data Preparation Checklist
- Check for duplicate order-line records.
- Confirm that order IDs and product IDs are consistent across tables.
- Standardize product names, categories, and subcategories.
- Check for missing or invalid dates.
- Investigate negative or zero quantities.
- Verify the definition of Sales Amount.
- Determine whether sales amounts already include discounts.
- Check whether costs are recorded per unit or per order line.
- Identify cancelled orders and returned products.
- Confirm that each return is associated with the correct order or order line.
- Validate currency and tax treatment.
- Document exclusions and calculation rules.
9. Step 2: Understand Dimensions and Measures
Tableau organizes data into dimensions and measures. Dimensions categorize information, while measures contain numeric values that can be aggregated.
| Field Type |
Examples |
Purpose |
| Dimensions |
Product Name, Category, Brand, Region |
Group and compare sales information. |
| Identifiers |
Order ID, Product ID, Customer ID |
Identify orders, products, and customers. |
| Measures |
Sales Amount, Quantity, Cost Amount, Profit |
Calculate totals, averages, and ratios. |
| Date Fields |
Order Date, Ship Date, Return Date |
Analyze trends and performance over time. |
| Calculated Fields |
Profit Margin, Average Order Value, Discount Rate |
Derive new analytical measures. |
10. Step 3: Create Essential Calculated Fields
Calculated fields allow Tableau users to derive metrics from existing data. To create one, select Analysis > Create Calculated Field, enter a field name, write the formula, and validate the calculation.
Official reference: Tableau – Creating Calculated Fields.
10.1 Total Sales Revenue
SUM([Sales Amount])
This calculation adds the recorded sales amounts. Confirm that Sales Amount represents the intended net or gross sales value and that cancelled orders and returns are handled consistently.
10.2 Total Quantity Sold
SUM([Quantity])
This calculates the sum of the quantity field. If the dataset contains returned quantities or cancelled orders, define whether the quantity should represent units ordered, shipped, or retained by customers.
10.3 Total Profit
If Sales Amount and Cost Amount are both recorded at the same order-line level and use compatible accounting definitions:
SUM([Sales Amount]) - SUM([Cost Amount])
If Cost Amount represents only product cost, the result is a product-level gross profit approximation, not necessarily final business profit. Other expenses such as shipping, payment processing, marketing, and operating costs may need separate treatment.
10.4 Profit per Order Line
If Sales Amount and Cost Amount are values for the entire order line:
[Sales Amount] - [Cost Amount]
If the cost field stores a unit cost rather than a line-level cost, use the appropriate line-level formula:
[Sales Amount] - ([Quantity] * [Unit Cost])
Use the formula that matches the actual source data. Do not multiply a cost amount by quantity if it is already a line total.
10.5 Profit Margin
IF SUM([Sales Amount]) != 0 THEN
(
SUM([Sales Amount]) - SUM([Cost Amount])
) / SUM([Sales Amount])
END
Format the result as a percentage. This example assumes the cost amount is defined at a compatible level and that Sales Amount represents the revenue denominator. Profit margin should be calculated from aggregate totals rather than by blindly averaging individual line-level margin percentages.
10.6 Average Order Value
IF COUNTD([Order ID]) != 0 THEN
SUM([Sales Amount]) / COUNTD([Order ID])
END
Average Order Value (AOV) is calculated as sales divided by distinct orders in the selected population. Define whether the metric uses gross sales, net sales after discounts, or sales after returns. Make sure cancelled orders are treated consistently.
10.7 Average Selling Price per Unit
IF SUM([Quantity]) != 0 THEN
SUM([Sales Amount]) / SUM([Quantity])
END
This gives a weighted average selling price based on total sales and total quantity. It may be more meaningful than averaging line-level prices when order lines have different quantities.
10.8 Discount Amount
If the source includes a Discount Amount field:
SUM([Discount Amount])
Confirm whether the discount is stored as a line total or per-unit value. The calculation changes if the source stores a per-unit discount.
10.9 Discount Rate
If List Price and the actual selling price are consistently defined, a possible line-level discount rate is:
IF [List Price] != 0 THEN
([List Price] - [Actual Unit Price]) / [List Price]
END
This formula assumes Actual Unit Price is the discounted price for one unit and that List Price is the relevant reference price. If discounts are stored separately or are applied to the full order line, calculate the rate using the matching line-level amounts instead.
10.10 Distinct Orders
COUNTD([Order ID])
This counts unique orders. It is preferable to counting rows when one order can contain multiple products or order lines.
10.11 Distinct Products Sold
COUNTD([Product ID])
This calculates the number of unique product IDs represented in the selected sales records. It does not necessarily count all products in the catalog, including products with no sales.
10.12 Revenue per Product
SUM([Sales Amount])
Place Product Name or Product ID in the view to calculate sales by product. The aggregation is performed at the level of detail of the visualization.
10.13 Return Rate
If the dataset contains a reliable return flag at the same order-line grain, a possible line-based return rate is:
SUM([Returned Line Flag])
/
COUNTD([Order Item ID])
This formula is suitable only if each order item is counted once and the returned-line flag is defined correctly. If the business needs a unit-based return rate, use returned units divided by eligible units sold. If the data contains partial returns, return quantities are generally more informative than a simple returned/not-returned flag.
10.14 Product Performance Category
IF SUM([Sales Amount]) >= 100000 THEN
"High Sales"
ELSEIF SUM([Sales Amount]) >= 50000 THEN
"Medium Sales"
ELSE
"Low Sales"
END
The thresholds are illustrative and depend on the selected level of detail and reporting period. For a reusable product classification, consider using a parameter or a product-level aggregate so that the category does not change unexpectedly when the view is rearranged.
11. Step 4: Understand Key E-Commerce KPIs
Key Performance Indicators (KPIs) are measurable values used to monitor business objectives. Each KPI should have a clear definition, reporting period, and data source.
11.1 Total Revenue
Total Revenue summarizes the sales value recorded for the selected population. Some businesses use gross sales, while others report net sales after discounts, cancellations, or returns. Clearly document the definition.
11.2 Total Orders
Total Orders measures the number of distinct orders in the selected period. Use COUNTD(Order ID) when an order appears on multiple product rows.
11.3 Average Order Value
Average Order Value = Total Sales / Distinct Orders
AOV helps businesses understand the average sales value per order. It can be compared across categories, regions, campaigns, or time periods.
11.4 Total Profit
Total Profit = Total Revenue - Applicable Costs
The cost definition must match the intended profitability measure. Product cost alone does not account for all expenses of operating an online store.
11.5 Profit Margin
Profit Margin = (Profit / Revenue) * 100
Profit margin indicates the portion of revenue represented by the selected profit measure. Compare margins only when the underlying cost and revenue definitions are consistent.
11.6 Units Sold
Units Sold is the sum of qualifying quantities in the dataset. It can help identify products with strong demand even when their unit prices are low.
11.7 Sales Growth Rate
Sales Growth Rate =
((Current Period Sales - Previous Period Sales)
/ Previous Period Sales) * 100
If previous-period sales are zero or missing, the percentage growth rate may be undefined. Use a suitable comparison or show the missing baseline clearly instead of presenting an invalid result.
11.8 Product Return Rate
Return rate can be measured by returned orders, returned order lines, or returned units. Select the definition that matches the business question and use a consistent denominator.
11.9 Product Contribution to Sales
Product Sales Contribution =
Product Sales / Total Sales
This metric measures the percentage of total sales generated by a product or category. In Tableau, it can be implemented with a percent-of-total table calculation or an appropriately scoped aggregate calculation.
| KPI |
Formula or Method |
Business Use |
| Total Revenue |
SUM(Sales Amount) |
Measure sales performance. |
| Total Orders |
COUNTD(Order ID) |
Measure order volume. |
| Units Sold |
SUM(Quantity) |
Understand product demand. |
| Average Order Value |
Total Sales / Distinct Orders |
Understand average order size. |
| Total Profit |
Revenue minus applicable costs |
Evaluate financial contribution. |
| Profit Margin |
Profit / Revenue |
Compare profitability relative to sales. |
| Sales Growth |
Period-over-period percentage change |
Monitor sales trends. |
| Return Rate |
Returns / Defined eligible population |
Monitor returns and product issues. |
| Sales Contribution |
Product Sales / Total Sales |
Understand revenue concentration. |
12. Step 5: Create Sales Analysis Worksheets
12.1 Monthly Sales Trend
- Create a new worksheet named Monthly Sales Trend.
- Drag Order Date to Columns.
- Choose Month as the date level and use a continuous timeline if appropriate.
- Drag Sales Amount to Rows and keep the aggregation as SUM.
- Select a line chart.
- Add a clear title and format the sales axis.
- Add Order Status or a relevant date filter if needed.
Business question: How does revenue change over time?
Interpretation: Look for seasonal patterns, growth, declines, and unusual changes. Confirm whether the selected period contains complete months before comparing totals.
12.2 Sales by Product Category
- Create a worksheet named Sales by Category.
- Drag Category to Rows.
- Drag Sales Amount to Columns.
- Choose a horizontal bar chart.
- Sort categories by sales in descending order.
- Show sales values in labels or tooltips.
- Optionally add profit as a tooltip or a separate comparison chart.
Business question: Which product categories generate the most sales?
12.3 Top 10 Products by Revenue
- Create a worksheet named Top 10 Products by Revenue.
- Drag Product Name to Rows.
- Drag Sales Amount to Columns.
- Sort products by total sales in descending order.
- Apply a Top N filter to Product Name.
- Select Top 10 by SUM(Sales Amount).
- Display the sales value and category in the tooltip.
Business question: Which products contribute the highest revenue?
Revenue leaders are not necessarily profit leaders. Consider a separate profit ranking to understand the difference.
12.4 Top Products by Units Sold
- Create a worksheet named Top Products by Quantity.
- Place Product Name on Rows.
- Place Quantity on Columns.
- Use SUM(Quantity).
- Sort descending.
- Apply a Top N filter if required.
- Include category and sales amount in the tooltip.
Business question: Which products sell the largest number of units?
12.5 Profit by Product Category
- Create a worksheet named Profit by Category.
- Place Category on Rows.
- Place the validated profit measure on Columns.
- Use a bar chart.
- Use color to distinguish positive and negative values if appropriate.
- Display both sales and profit in the tooltip.
Business question: Which categories contribute the most profit under the selected cost definition?
12.6 Product Profitability Matrix
- Create a worksheet named Product Profitability Matrix.
- Place Category and Product Name on Rows.
- Place Sales Amount and the validated profit measure in the view.
- Use color to encode profit margin where meaningful.
- Include units sold and order count in the tooltip.
- Use filters to focus on selected categories.
Business question: Which products combine strong sales with healthy profitability?
12.7 Sales by Region
- Create a worksheet named Sales by Region.
- Place Region, State, or Country in the view.
- Use the appropriate geographic role if Tableau recognizes the field.
- Drag Sales Amount to Color or Size.
- Review geographic matches and correct ambiguous locations.
- Provide a non-map alternative, such as a sorted bar chart, for easier comparison.
Business question: Which regions generate the highest sales?
12.8 Discount vs Profit Analysis
- Create a worksheet named Discount vs Profit.
- Place the validated discount measure on Columns.
- Place profit on Rows.
- Place Product Name or Order Item ID on Detail according to the desired level of analysis.
- Use color to distinguish product categories.
- Inspect the distribution and identify observations that require further investigation.
Business question: How are discounts associated with profit outcomes?
A relationship between discounts and profit does not automatically establish causation. Discounted items may differ in demand, seasonality, product lifecycle, or customer segment.
12.9 Average Order Value by Region
- Create a worksheet named AOV by Region.
- Place Region on Rows.
- Use the AOV calculation for each region.
- Sort regions by AOV.
- Include distinct order count in the tooltip.
- Check that each order is counted correctly even if it contains multiple product lines.
Business question: Which regions have the highest average sales value per order?
12.10 Product Return Analysis
- Create a worksheet named Product Return Analysis.
- Connect the validated returns data to the sales or order-item data.
- Relate returns to the correct order or order-line identifier.
- Calculate the approved return count or returned-unit rate.
- Compare return patterns by category and product.
- Include return reason when available and suitable for reporting.
Business question: Which products or categories have higher return activity?
Be careful when joining returns to order lines. Multiple return records can duplicate sales rows and inflate revenue or quantity if the relationship is not modeled correctly.
13. Step 6: Build the E-Commerce Dashboard
An effective dashboard combines the most important sales KPIs with charts that explain performance across products, categories, regions, and time. It should help users move from an overall summary to more detailed analysis.
13.1 Recommended Dashboard Layout
----------------------------------------------------------
| E-COMMERCE SALES AND PRODUCT ANALYSIS DASHBOARD |
----------------------------------------------------------
| Date Range | Category | Product | Region | Order Status |
----------------------------------------------------------
| Total Sales | Total Profit | Orders | Units Sold | AOV |
----------------------------------------------------------
| Monthly Sales Trend | Sales by Category |
----------------------------------------------------------
| Top Products by Revenue | Profit by Category |
----------------------------------------------------------
| Regional Sales | Discount vs Profit |
----------------------------------------------------------
| Product Return Analysis / Product Detail Summary |
----------------------------------------------------------
13.2 Assemble the Dashboard
- Click New Dashboard in Tableau.
- Rename it E-Commerce Sales and Product Analysis Dashboard.
- Choose a dashboard size suitable for the intended device.
- Add KPI worksheets for sales, profit, orders, units sold, and AOV.
- Add monthly sales trend and category performance charts.
- Add top-product and profitability views.
- Include regional and returns analysis when reliable data is available.
- Add filters for date, category, product, region, and order status.
- Configure tooltips and dashboard actions.
- Use consistent number formats, titles, and colors.
- Test the dashboard with several filter combinations.
13.3 Recommended KPI Cards
| KPI Card |
Purpose |
| Total Sales |
Shows the sales value for the selected period and population. |
| Total Profit |
Shows profit under the chosen cost definition. |
| Total Orders |
Shows the number of distinct orders. |
| Units Sold |
Shows the total qualifying units sold. |
| Average Order Value |
Shows average sales value per order. |
| Profit Margin |
Shows profit relative to revenue. |
| Sales Growth |
Shows the percentage change compared with a defined prior period. |
| Return Rate |
Shows returns relative to the selected eligible population, if return data is available. |
14. Step 7: Add Filters and Dashboard Actions
Filters allow dashboard users to focus on selected products, categories, regions, and time periods. They make the dashboard more useful for exploratory analysis.
14.1 Useful Dashboard Filters
- Order Date: Select a date range or reporting period.
- Category: Analyze a specific product category.
- Subcategory: Explore a smaller product group.
- Product Name: Focus on an individual product.
- Brand: Compare product brands.
- Region: Compare geographic performance.
- Order Status: Include or exclude selected order statuses according to the metric definition.
- Customer Segment: Analyze customer groups if the dataset supports this field.
- Return Status: Review returned and non-returned items where return records are reliable.
14.2 Apply a Filter to Multiple Worksheets
- Display the filter on a worksheet or dashboard.
- Open the filter menu.
- Select Apply to Worksheets.
- Choose the worksheets that should respond to the filter.
- Confirm that the selected worksheets use compatible fields and data sources.
- Test the dashboard to ensure all charts respond as expected.
14.3 Create a Dashboard Filter Action
A dashboard filter action allows a user to select a category or product in one chart and filter related charts automatically.
- Open the dashboard.
- Select Dashboard > Actions.
- Add a Filter action.
- Choose the source worksheet, such as Sales by Category.
- Choose the target worksheets, such as Top Products and Profit by Category.
- Set the action to run on selection.
- Test the action and confirm that clearing the selection restores the expected view.
15. Step 8: Product Performance Classification
Product performance classification groups products according to selected business rules. It can help teams distinguish high-revenue products, strong profit contributors, and products that need further investigation.
15.1 Classify Products by Revenue
Create a product-level sales measure, then classify products according to documented thresholds. Revenue thresholds should reflect the business size, product category, and analysis period.
15.2 Classify Products by Profitability
Use profit and profit margin together to identify different product patterns. A product with high sales but low margin may require a different action from a product with low sales but a healthy margin.
| Product Pattern |
Possible Interpretation |
Possible Investigation |
| High sales, high profit |
Strong sales and financial contribution. |
Check stock availability and opportunities to sustain performance. |
| High sales, low margin |
Large sales volume but limited profit relative to revenue. |
Review costs, discount levels, shipping expenses, and pricing. |
| Low sales, high margin |
Strong margin but limited demand or sales volume. |
Review visibility, audience fit, product availability, and demand. |
| Low sales, low profit |
Weak performance on both selected measures. |
Investigate product lifecycle, demand, pricing, and product quality. |
| Negative profit |
Recorded costs exceed the selected revenue measure. |
Validate source data and investigate costs, refunds, and discounting. |
These categories are analytical signals, not automatic instructions to discontinue products. Consider inventory constraints, strategic value, product lifecycle, customer needs, and data quality before making decisions.
16. Step 9: Analyze Sales Trends and Seasonality
Sales trend analysis examines changes in revenue, orders, and product demand over time. It can reveal growth, declines, seasonal patterns, and unusual movements.
16.1 Monthly Sales Analysis
Aggregate sales by month and compare consecutive periods. Confirm that each period has comparable coverage and that the selected order statuses are consistent.
16.2 Year-over-Year Comparison
Compare the same period across different years to reduce the influence of some seasonal patterns. Consider changes in product assortment, pricing, promotions, and data coverage before drawing conclusions.
16.3 Sales Growth Analysis
Use a defined prior period to calculate sales growth. A percentage growth calculation is not meaningful when the comparison baseline is zero or missing, so show an appropriate indicator in those cases.
16.4 Seasonality Analysis
Seasonality may occur around holidays, school periods, seasonal weather, or promotional events. Use multiple years of data where possible to distinguish recurring patterns from one-time events.
17. Step 10: Advanced E-Commerce Analysis
17.1 Customer Purchase Analysis
If Customer ID is available, analyze distinct customers, orders per customer, repeat purchases, and customer-level sales. Avoid treating multiple order lines from the same order as separate customer purchases.
17.2 Repeat Purchase Rate
A possible customer-level repeat purchase rate is the share of eligible customers who place more than one distinct order during the defined period.
Repeat Purchase Rate =
Customers With More Than One Eligible Order
/
Total Eligible Customers
To calculate this accurately in Tableau, first derive each customer's distinct order count for the chosen period, then aggregate the number of customers who meet the repeat-purchase condition. Define the eligible customer population and period clearly.
17.3 Customer Segmentation
Customer segmentation groups customers according to selected characteristics or purchasing behavior. Examples include new versus repeat customers, order-frequency groups, and customer value bands. Any segmentation should be based on documented rules and relevant data.
17.4 RFM Analysis
RFM stands for Recency, Frequency, and Monetary Value:
- Recency: How recently a customer placed an eligible order.
- Frequency: How many distinct eligible orders the customer placed in a defined period.
- Monetary Value: The sales value associated with the customer's eligible orders.
RFM analysis can help explore customer purchasing patterns and inform retention or marketing strategies. It requires customer-level transaction data and a clearly defined analysis date.
17.5 Discount Effectiveness
Compare sales volume, revenue, and profit across discount groups or campaigns. Account for product differences, time periods, seasonality, and customer mix. Higher sales during a discount period do not by themselves prove that the discount caused the increase.
17.6 Inventory and Product Availability
If inventory data is available, compare stock levels with sales demand and product availability. This can help identify possible stockout risks or slow-moving inventory. Sales records alone cannot confirm current inventory levels.
17.7 Product Return Analysis
Analyze return counts, returned quantities, refund values, and recorded return reasons. Compare products using the same return definition and eligible sales population. Be careful with partial returns and multiple return records.
17.8 Sales Channel Analysis
If the dataset includes sales channel information, compare website, mobile application, marketplace, or other channel performance. Ensure that revenue and order definitions are consistent across channels.
18. Step 11: Tableau Features Useful for E-Commerce Analysis
| Feature |
Purpose |
Example |
| Calculated Fields |
Derive new measures from existing data. |
Profit margin and AOV. |
| Filters |
Restrict the data displayed in a view. |
Show sales for one category. |
| Parameters |
Allow users to select values used by calculations. |
Choose Top 5, Top 10, or Top 20 products. |
| Table Calculations |
Calculate values across the marks in a view. |
Percent of total sales. |
| Sets |
Define groups of members for analysis. |
Compare selected top products with other products. |
| Hierarchies |
Organize fields into drill-down levels. |
Category to subcategory to product. |
| Dashboard Actions |
Connect worksheets through user interactions. |
Select a category to filter product charts. |
| Tooltips |
Display additional information on hover. |
Show sales, profit, and quantity for a product. |
| Forecasting |
Estimate future values when the data supports forecasting. |
Forecast monthly sales using historical trends. |
| Extracts |
Store optimized data for analysis. |
Improve performance for selected datasets. |
19. Step 12: Common Problems and Solutions
| Problem |
Possible Cause |
Recommended Solution |
| Revenue is too high |
Duplicate rows or a many-to-many join. |
Check the data grain and relationship structure. |
| Order count is too high |
Counting order lines instead of distinct orders. |
Use COUNTD(Order ID). |
| Profit is incorrect |
Cost is stored per unit but treated as a line total, or vice versa. |
Confirm the cost definition and calculate at the correct grain. |
| Profit margin is misleading |
Averaging line-level percentages instead of using aggregate totals. |
Calculate total profit divided by total revenue. |
| Sales growth is blank or invalid |
Previous-period sales are zero or missing. |
Handle zero baselines and missing periods explicitly. |
| Top products change unexpectedly |
Filters or level of detail change the ranking population. |
Document the ranking scope and test filter behavior. |
| Product category is missing |
Unmatched product IDs or null category values. |
Validate product mappings and handle unmatched records. |
| Returns inflate sales |
Joining multiple return records duplicates order lines. |
Model return data at the correct grain and validate totals. |
| Geographic map is incorrect |
Ambiguous place names or invalid geographic roles. |
Assign correct geographic roles and verify locations. |
| Dashboard loads slowly |
Large data volume, expensive calculations, or excessive marks. |
Optimize the data model, calculations, and worksheet design. |
| Discount rate is wrong |
Discount stored per unit but treated as a line total, or an incorrect price denominator. |
Confirm the discount and price definitions. |
| Category totals do not reconcile |
Null categories, inconsistent filters, or duplicate mappings. |
Validate product relationships and category coverage. |
20. Step 13: Dashboard Design Best Practices
- Place the most important KPIs near the top of the dashboard.
- Use line charts to show sales trends over time.
- Use sorted bar charts to compare products and categories.
- Use scatter plots to explore relationships between numeric variables.
- Use maps when geographic patterns matter, and include a bar chart when exact comparisons are important.
- Use consistent number formats and currency labels.
- Label whether sales represent gross sales, net sales, or another defined measure.
- Use tooltips to display supporting measures without overcrowding the view.
- Limit filters to those that support meaningful business questions.
- Use accessible colors and clear labels.
- Show the reporting period and relevant data limitations.
- Validate all calculations against the source data.
- Reduce unnecessary worksheets, marks, and complex calculations.
- Test the dashboard at its intended screen size.
21. Step 14: Publish and Share the Dashboard
- Save the Tableau workbook with a clear and descriptive name.
- Validate sales, profit, order count, and other KPIs.
- Confirm that the selected data source refreshes correctly.
- Publish to Tableau Server or Tableau Cloud if available.
- Assign appropriate permissions to sales, product, finance, and management users.
- Test the dashboard using an authorized viewer account.
- Confirm that filters and dashboard actions work correctly.
- Check that sensitive customer information is not exposed unnecessarily.
- Document calculation definitions and the data refresh schedule.
- Monitor the dashboard after publishing and update it when business definitions change.
22. Practical Project: E-Commerce Sales and Product Analysis Dashboard
Project Objective: Build an interactive Tableau dashboard that measures sales, profitability, product demand, category performance, and regional trends using a validated e-commerce dataset.
22.1 Project Requirements
- Sales dataset containing Order ID, Order Date, Product ID, Quantity, Sales Amount, and Cost Amount.
- Product dataset containing Product Name, Category, Subcategory, and Brand.
- Optional customer dataset containing Customer ID, Region, and Customer Segment.
- Optional returns dataset containing return identifiers, returned quantities, and refund values.
- Calculated fields for revenue, profit, profit margin, AOV, and other relevant metrics.
- Worksheets for sales trends, category performance, top products, profitability, and regional analysis.
- Dashboard filters for date, category, product, and region.
- Validation checks for duplicate rows, order counts, costs, and return handling.
22.2 Project Implementation
Step 1: Import the Data
Connect Tableau to the sales, product, customer, and returns datasets as required. Identify the grain of each table and select suitable relationships.
Step 2: Clean and Validate
Standardize product categories, inspect order dates, check duplicate line items, and confirm that sales, costs, and discounts are represented consistently.
Step 3: Create Calculated Fields
Create total revenue, total orders, units sold, total profit, profit margin, average order value, and other metrics supported by the source data.
Step 4: Build Worksheets
- Monthly Sales Trend.
- Sales by Category.
- Top 10 Products by Revenue.
- Top Products by Quantity.
- Profit by Category.
- Product Profitability Matrix.
- Sales by Region.
- Discount vs Profit.
- Product Return Analysis, if returns data is available.
Step 5: Create the Dashboard
Add KPI cards at the top, sales and category charts in the main section, and product profitability and regional views below. Add filters and configure actions so users can explore the data interactively.
Step 6: Validate the Results
Compare Tableau totals with source totals. Confirm that each order is counted once, costs are calculated at the correct level, returns do not duplicate sales, and all filters behave consistently.
Step 7: Publish the Dashboard
Publish the completed workbook to an approved Tableau environment. Check permissions, data refresh behavior, and customer information exposure before sharing it with stakeholders.
22.3 Expected Project Outcomes
- A clear view of sales performance over time.
- Identification of products and categories with strong sales.
- Visibility into product-level profitability.
- Improved understanding of regional sales distribution.
- Analysis of discounts and returns where relevant data is available.
- Interactive exploration of e-commerce performance.
- A documented and validated dashboard suitable for business reporting.
23. Interview Questions and Answers
Q1. What is E-Commerce Analytics?
Answer: E-Commerce Analytics is the analysis of online sales, orders, products, customers, and related business data to understand performance and support decisions.
Q2. What is product analysis?
Answer: Product analysis evaluates sales, quantity sold, revenue, profitability, pricing, discounts, and returns for individual products or product categories.
Q3. What is the difference between sales and profit?
Answer: Sales represent the recorded value of transactions under the chosen sales definition. Profit is calculated by subtracting the applicable costs from the relevant revenue measure.
Q4. How do you calculate profit margin?
Answer: Profit margin is calculated as profit divided by revenue, multiplied by 100. The underlying profit and revenue definitions must be consistent.
Q5. What is Average Order Value?
Answer: Average Order Value is the sales value divided by the number of distinct eligible orders during the selected period.
Q6. Why should COUNTD(Order ID) be used?
Answer: An order may contain several product lines. COUNTD(Order ID) counts each distinct order once instead of counting every line as a separate order.
Q7. What is the difference between revenue and units sold?
Answer: Revenue measures the sales value, while units sold measures the number of product units. A product may have high unit sales but comparatively low revenue if its price is low.
Q8. How do you identify top-selling products in Tableau?
Answer: Place Product Name in the view, aggregate sales or quantity, sort in descending order, and apply a Top N filter based on the selected measure.
Q9. What is a calculated field?
Answer: A calculated field is a new field created from existing data using a formula, such as profit margin or average order value.
Q10. How do you analyze monthly sales?
Answer: Place Order Date on Columns at the month level and SUM(Sales Amount) on Rows, then use a line chart to show changes over time.
Q11. What is the difference between profit and profit margin?
Answer: Profit is an amount of money under a defined cost model. Profit margin expresses that profit as a proportion of revenue.
Q12. How can discounts affect profitability?
Answer: Discounts reduce the selling price and may reduce profit per unit. Their overall effect depends on costs, sales volume, product mix, and whether additional sales offset the lower price.
Q13. What is a product return rate?
Answer: It measures returns relative to a defined population, such as eligible units sold or orders. The numerator and denominator must use compatible definitions.
Q14. What is a dashboard action in Tableau?
Answer: A dashboard action connects views through user interaction. For example, selecting a category in one chart can filter related product charts.
Q15. What is a dimension in Tableau?
Answer: A dimension is a field used to categorize data, such as Product Name, Category, or Region.
Q16. What is a measure in Tableau?
Answer: A measure is a field that can be aggregated, such as Sales Amount, Quantity, Cost Amount, or Profit.
Q17. Why can revenue be duplicated after joining tables?
Answer: A join may create multiple rows for one order line when the related table contains several matching records. Correct relationships, table grain, and aggregation must be checked.
Q18. How do you analyze product profitability?
Answer: Compare revenue, applicable costs, profit, and profit margin at a consistent product level. Investigate the data definitions before drawing conclusions.
Q19. How can customer data improve sales analysis?
Answer: Customer data can support analysis of order frequency, repeat purchasing, customer segments, geographic patterns, and customer-level sales value.
Q20. What should be checked before publishing a sales dashboard?
Answer: Validate source data, calculated fields, order counts, cost definitions, filters, refresh behavior, dashboard performance, and access permissions.
24. Practice Exercises
- Connect Tableau to an e-commerce sales dataset.
- Identify the grain of the sales and product tables.
- Create a KPI card for total revenue.
- Calculate distinct order count.
- Calculate total units sold.
- Create an average order value calculation.
- Calculate total profit and profit margin using the correct cost definition.
- Create a monthly sales trend chart.
- Build a category-wise sales comparison.
- Identify the top 10 products by revenue.
- Identify the top 10 products by quantity sold.
- Build a profit-by-category chart.
- Analyze sales by region.
- Explore the relationship between discounts and profit.
- Analyze returns if reliable returns data is available.
- Add filters for date, category, and region.
- Create a dashboard action that filters product views.
- Validate revenue and order totals against the source data.
- Publish the dashboard in an approved environment.
25. E-Commerce Dashboard Quality Checklist
Data Quality
- ☐ Order and product identifiers are consistent.
- ☐ Duplicate order lines have been investigated.
- ☐ Sales, costs, and discounts have documented definitions.
- ☐ Order dates and numeric values are valid.
- ☐ Cancelled orders and returns are handled consistently.
- ☐ Table relationships do not unintentionally duplicate sales.
Metrics and Calculations
- ☐ Revenue reflects the intended sales definition.
- ☐ Distinct orders are counted correctly.
- ☐ Quantity sold uses the intended unit definition.
- ☐ Profit uses the correct cost basis.
- ☐ Profit margin is calculated from compatible aggregate values.
- ☐ AOV uses distinct eligible orders.
- ☐ Return rate uses a documented numerator and denominator.
Dashboard Design
- ☐ KPI cards are clearly labeled.
- ☐ Charts are appropriate for the analysis question.
- ☐ Filters work across the intended worksheets.
- ☐ Dashboard actions behave correctly.
- ☐ Currency, dates, and percentage formats are consistent.
- ☐ The reporting period and metric definitions are visible.
Publishing and Maintenance
- ☐ Data refresh is working.
- ☐ Dashboard permissions are appropriate.
- ☐ Sensitive customer information is protected.
- ☐ Dashboard performance has been tested.
- ☐ Metric definitions and assumptions are documented.
26. Quick Revision Notes
- E-Commerce Analytics: Analysis of online business data to improve sales and operations.
- Product Analysis: Evaluation of product sales, quantity, profit, and demand.
- Total Revenue: Sum of the defined sales measure.
- Total Orders: Count of distinct eligible orders.
- Units Sold: Sum of eligible quantities.
- Average Order Value: Sales divided by distinct eligible orders.
- Total Profit: Revenue minus applicable costs.
- Profit Margin: Profit divided by revenue.
- Sales Growth: Percentage change between defined periods.
- Product Contribution: Product sales divided by total sales.
- Return Rate: Returns divided by a defined eligible population.
- Calculated Field: A field created using a formula.
- Dimension: A field used to categorize data.
- Measure: A field that can be aggregated.
- Dashboard Action: An interaction connecting Tableau views.
- Data Grain: What one row in a dataset represents.
- RFM Analysis: Customer analysis using recency, frequency, and monetary value.
27. Conclusion
E-Commerce Sales and Product Analysis in Tableau helps businesses transform order and product data into actionable visual insights. By analyzing revenue, orders, units sold, profit, product categories, and sales trends, organizations can better understand performance and identify areas that deserve further investigation.
Building an effective dashboard requires more than creating charts. Analysts must understand the source data, confirm the grain of each table, calculate KPIs correctly, and handle discounts, costs, cancellations, and returns consistently. Interactive filters and dashboard actions make it easier for business users to explore the information and answer specific questions.
By completing the exercises and practical project in these notes, learners can develop the skills needed to connect e-commerce data, create calculated fields, build product and sales visualizations, validate business metrics, and publish an interactive Tableau dashboard.
Explore Tableau Training: JustAcademy Tableau Training
Register for a Course Demo: Register for a Tableau Course Demo
Additional Learning Resources