Tableau - Customer Aquisition with LOD Expressions

The task is to show customer growth over time for different regions on the macro and micro level.

Step 1: Create a new LOD calculated field in Tableau called "First Purchase Date" and type


                {FIXED [Customer ID]: MIN([Order Date])}
                 

Step 2: Create a calculated field in Tableau called "Customer Type" and type


                IF [First Purchase Date] = [Order Date] THEN 'new' ELSE 'existing' END
                 

Step 3: Add "First Purchase Date" to the column shelf, "Customer ID" to the row shelf and "Customer Type" to Filter. Filter only on "new"

Step 4: For YEAR(First Purchase Date) in the Columns shelf, right click and select the Quarter (the continuous one above week number).

  • Calculation Type: Percentage of Total
  • Compute using: Table (down)

Step 5: Right click on "Customer ID" in the Rows shelf and select:

  • Measure -> Count (Distinct)
  • Quick Table Calculation -> Running Total

Step 6: Drag Market to Color


Adding Drill Down Features


Step 7: Rename the current sheet to Market View and right click and duplicate sheet. Change the new sheet name to Country View. Duplicate again and rename to State View

Step 8: In Country View drag "Country" to color and in State View drag "State" to color.

Step 8: In "Market View" select Worksheet and Actions. Add action as a filter action and in the pop up menu:

  • Name: Market to Country
  • Source Sheets: Market View
  • Target Sheets: Country View
  • Run Action on: Select and run on single select only
  • Clearing Section will: Leave the filter
  • Target Filters: Selected Fields -> Add Filter with Source and Target Field being Market

Step 9: In "State View" select Worksheet and Actions. Add action as a filter action and in the pop up menu:

  • Name: Country to State
  • Source Sheets: Country View
  • Target Sheets: State View
  • Run Action on: Select and run on single select only
  • Clearing Section will: Leave the filter
  • Target Filters: Selected Fields -> Add Filter with Source and Target Field being Country

Tip: When creating a Dashboard you can create similar action filters. Similar Actions need to be recreated at the dashboard level. (ie. Dashboard -> Actions tab up top.) Similarily, create three separate dashboards using Market View, Country View and State View sheets.





Services
  • SEO
  • Online Advertising
  • Online Ordering For Restaurants
  • Data Analytics

  • External Resources 4 Developers
  • CSS Tricks
  • MDN

  • Dash-Intel.com is a Power BI and Tableau resource site around data visualizations and building business dashboards.

    Data Analytics consultants in Edmonton, Alberta specializing in Tableau and marketing analytics

    Copyright 2020 Dash-Intel.com Terms / All rights reserved.