How can we analyze sales data imported from Excel and CSV files to understand monthly sales trends and total revenue?
Excel and CSV connections in Tableau - Dashboard Guide
Dashboard Mode - Excel and CSV connections
Business Question
Sample Data
Below are two sample data tables representing sales data imported from Excel and CSV files.
Excel Data: Monthly Sales
| Month | Sales |
|---|---|
| January | 1000 |
| February | 1500 |
| March | 1200 |
| April | 1700 |
| May | 1600 |
CSV Data: Product Revenue
| Product | Revenue |
|---|---|
| Widget A | 3000 |
| Widget B | 2500 |
| Widget C | 4000 |
| Widget D | 3500 |
| Widget E | 2800 |
Dashboard Components
- KPI Card: Total Sales
Formula:SUM([Sales])
Result: 7000 (sum of sales from Excel data) - KPI Card: Total Revenue
Formula:SUM([Revenue])
Result: 15800 (sum of revenue from CSV data) - Line Chart: Monthly Sales Trend
X-axis: Month
Y-axis: Sales
Data Source: Excel data
Description: Shows sales progression from January to May. - Bar Chart: Revenue by Product
X-axis: Product
Y-axis: Revenue
Data Source: CSV data
Description: Compares revenue across products.
Dashboard Layout
+----------------------+----------------------+ | Total Sales (KPI) | Total Revenue (KPI) | +----------------------+----------------------+ | | | Monthly Sales Trend (Line Chart) | | | +----------------------------------------------+ | | | Revenue by Product (Bar Chart) | | | +----------------------------------------------+
Interactivity
Adding a filter for Month will update the Monthly Sales Trend line chart and the Total Sales KPI card to show data only for the selected months.
Adding a filter for Product will update the Revenue by Product bar chart and the Total Revenue KPI card to show data only for the selected products.
Filters do not cross-filter between Excel and CSV data sources because they represent different data sets.
Self Check
If you add a filter to show only March and April in the Month filter, which components update and what are their new values?
- Monthly Sales Trend updates to show sales for March (1200) and April (1700).
- Total Sales KPI updates to 2900 (1200 + 1700).
- Revenue by Product and Total Revenue KPI remain unchanged.
Key Result
Dashboard showing total sales and revenue with monthly sales trend and product revenue charts from Excel and CSV data.
Practice
1. What is the first step to connect an Excel file in Tableau?
easy
Solution
Step 1: Open Tableau and locate data connection options
Tableau starts with a welcome screen where you can choose data sources.Step 2: Select the correct file type for Excel
Choosing 'Microsoft Excel' allows Tableau to open and read Excel files.Final Answer:
Click on 'Connect to Data' and select 'Microsoft Excel' -> Option AQuick Check:
First step is selecting Excel connection [OK]
Hint: Always start by choosing the correct file type in Tableau [OK]
Common Mistakes:
- Trying to open Excel data without selecting the file type
- Assuming drag and drop works for Excel files
- Starting with a worksheet instead of connecting data
2. Which of the following is the correct way to connect a CSV file in Tableau?
easy
Solution
Step 1: Identify the correct connection type for CSV files
CSV files are considered text files, so 'Text File' is the right choice.Step 2: Select the CSV file after choosing 'Text File'
After selecting 'Text File', browse and pick your CSV file to load data.Final Answer:
Select 'Text File' under 'Connect' and choose your CSV file -> Option AQuick Check:
CSV files connect via 'Text File' option [OK]
Hint: CSV files connect through 'Text File' option in Tableau [OK]
Common Mistakes:
- Choosing 'Microsoft Excel' for CSV files
- Using 'Web Data Connector' unnecessarily
- Dragging file without selecting file type
3. After connecting an Excel file with multiple sheets, what does Tableau show by default?
medium
Solution
Step 1: Understand Tableau's behavior on Excel connection
Tableau reads the Excel file and lists all sheets available for selection.Step 2: Recognize that Tableau does not auto-load any sheet
It waits for the user to pick which sheet(s) to use for analysis.Final Answer:
A list of all sheets to choose from -> Option CQuick Check:
Tableau lists sheets after Excel connection [OK]
Hint: Tableau shows all sheets to pick after Excel connection [OK]
Common Mistakes:
- Assuming Tableau loads only the first sheet automatically
- Thinking Tableau merges sheets by default
- Expecting a blank worksheet without data options
4. You connected a CSV file but Tableau shows an error saying 'File not found'. What is the most likely cause?
medium
Solution
Step 1: Analyze the error message 'File not found'
This usually means Tableau cannot locate the file at the saved path.Step 2: Check if the file was moved or deleted
If the CSV file was moved or deleted after connecting, Tableau loses the link.Final Answer:
The CSV file was moved or deleted after connection -> Option BQuick Check:
'File not found' means missing file [OK]
Hint: Ensure CSV file stays in original location after connecting [OK]
Common Mistakes:
- Assuming Tableau does not support CSV files
- Thinking file open in another program causes 'File not found'
- Blaming file size for connection errors
5. You want to combine data from multiple CSV files with the same structure in Tableau. What is the best approach?
hard
Solution
Step 1: Understand the goal to combine multiple CSV files with same columns
Union stacks data vertically, perfect for files with same structure.Step 2: Use Tableau's 'Union' feature to combine files
After connecting one CSV, you can add others via Union to merge rows.Step 3: Recognize why other options are less efficient
Joining merges columns, not rows; copying data manually is error-prone; separate worksheets don't combine data.Final Answer:
Use the 'Union' feature after connecting the first CSV file -> Option DQuick Check:
Union stacks same-structure files vertically [OK]
Hint: Use Union to stack multiple CSV files with same columns [OK]
Common Mistakes:
- Using Join instead of Union for same-structure files
- Connecting files separately without combining
- Manually merging files outside Tableau
Recommended
Ready to prove it?
Pass the test and this pattern moves unknown
10 questions ~5 mineasy hard
