0
0
Tableaubi_tool~8 mins

Type conversion functions in Tableau - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - Type conversion functions
Business Question

How can we convert data types in Tableau to analyze sales data correctly and display meaningful KPIs and charts?

Sample Data
Order IDCustomerOrder DateSales (Text)Quantity (Text)Region
1001Alice2024-01-15"100.50""2"East
1002Bob2024-02-20"200""3"West
1003Charlie2024-03-05"150.75""1"East
1004Diana2024-04-10"300""4"South
1005Eva2024-05-18"250.25""2"West
Dashboard Components
  • KPI Card: Total Sales
    Formula: FLOAT([Sales (Text)]) converted and summed
    Calculation: SUM(FLOAT([Sales (Text)])) = 100.50 + 200 + 150.75 + 300 + 250.25 = 1001.5
    Shows total sales as a number
  • KPI Card: Total Quantity
    Formula: INT([Quantity (Text)]) converted and summed
    Calculation: SUM(INT([Quantity (Text)])) = 2 + 3 + 1 + 4 + 2 = 12
    Shows total quantity sold
  • Bar Chart: Sales by Region
    Uses FLOAT([Sales (Text)]) for numeric sales values
    Aggregates sales per region:
    East: 100.50 + 150.75 = 251.25
    West: 200 + 250.25 = 450.25
    South: 300
    Shows bars representing these totals
  • Table: Orders with Converted Types
    Columns:
    - Order ID
    - Customer
    - Order Date (Date type)
    - Sales (converted to number)
    - Quantity (converted to number)
    - Region
    Shows raw and converted data side by side
Dashboard Layout
+----------------------+----------------------+
|   Total Sales KPI    |  Total Quantity KPI  |
+----------------------+----------------------+
|                      Bar Chart: Sales by Region                      |
+---------------------------------------------------------------------+
|                      Table: Orders with Converted Types             |
+---------------------------------------------------------------------+
Interactivity

A filter on Region allows users to select one or more regions. When a region is selected:

  • The Total Sales and Total Quantity KPIs update to show sums only for the selected regions.
  • The Bar Chart updates to show sales bars only for the selected regions.
  • The Orders Table filters to show only orders from the selected regions.

This helps users focus on specific areas and see how sales and quantities change.

Self Check

If you add a filter for Region = East, which components update and what are their new values?

  • Total Sales KPI: 100.50 + 150.75 = 251.25
  • Total Quantity KPI: 2 + 1 = 3
  • Bar Chart: Shows only one bar for East with value 251.25
  • Orders Table: Shows only orders 1001 and 1003
Key Result
Dashboard showing total sales and quantity with type conversion, sales by region bar chart, and detailed orders table.