JESWIN GEORGE

Logo

DATA ANALYST
Download my resume
View My LinkedIn Profile
View My Tableau Public Profile

View My GitHub Profile

I tried to implement the Tableau visualizations using LOD expressions made in the blog .

Important Tip: Measures are aggregated when added to the view. Adding a dimension will increase the granularity of the view.

1. Customer order frequency

Download dataset used here

Number of customers who ordered one order, two orders, three others and four others. To create a histogram of the number of customers who purchased 1,2,3,…N times.

Steps:

Link to the created visualisation

LOD1

2. Cohort analysis

Download dataset used here

To compare a group (cohort) of customers based on their first year of order date and check their contribution to the overall Sales.

Important reference: Tableau Order of expression evaluation

Steps:

3. Daily profit KPI

Download dataset used here

To know the number of profitable days achieved each month or year, especially if we were curious about seasonal effects. The following view shows how LOD Expressions allow us to easily create bins on aggregated data such as profit per day, while the underlying data is recorded at a transactional level.

Here we will set KPIS as :

Steps:

4. Percent of total

Download dataset used here

Here we will try to find the percentage of sales contributed by each country and also use filter Market.

Steps:

  1. To calculate the total sale use fixed LOD. Create a calculated field Total sales: {SUM([Sales])}. This will create a single column with constant value of total sales. LOD4

  2. To find the overall sale %ge create calculated field Percent of total: SUM([Sales])/[Total sales]. This will create a single column which has %ge sale for that row. LOD4

  3. Now double click on the country to create a map.
  4. Drag claculated field Percent of total to color and label marks card.
  5. Add Market as quick filer which aids in focussing on a particular Market.
  6. APAC Market view with their percentage of total sales value. LOD4

Link to the created visualization.

5. New customer acquisition

Download dataset used here

What is the daily trend of total customer acquisition by market? Finding the trend in this data will help us understand how well the regional marketing and sales organizations are doing at generating new business. The steeper the line, the better the acquisition trend. As a line flattens out, some action must be taken to increase lead flow.

An LOD Expression ensures that repeat customers are not miscounted as new customers, as data must be evaluated at the customer level even though it is displayed visually by market and day.

  1. Create a calulated field Customer Joining Date: { FIXED [Customer ID]: MIN([Order Date])} LOD5

  2. Now created another calculated field to see for a given order date the customer who ordered was an Existing or a New customer. Named the calculated filed is New Or Existing: IIF([Customer Joining date]=[Order Date], "New", "Existing") LOD5

  3. Create a 3rd calculated field Count of distinct customers: COUNTD([Customer ID])
  4. Now Drag the field Order Date to columns and convert it to (Months/Year) format.
  5. Drag the calculated field Count of distinct customers to rows and do a quick table calculation of _Running Total__ to see all the new customers added over the Month/years.
  6. Now drag the calculated filed New Or Existing to filters and select - New.
  7. Now drag the field Market to colors mark card to see distinct new customers added to each market.
  8. Now create a dashboard after doing the necessary formatting. LOD5

Link to the created visualization.

6. Comparative sales analysis

It’s relatively straightforward to find the difference from average, but what if you wanted to find the difference from a selected category? First, you must isolate the sales of the selected category. Then an EXCLUDE Expression is needed to repeat that value across all other categories. It is then easy to take the difference of each category’s sales from the rest.

Steps:

  1. Create a parameter __ Select a Sub-Category__ LOD6

    Worksheet after adding Sub-category and SUM(Sales) to it and after sorting in descending order.

    LOD6

  2. Need to isolate the sales of sub-category we are interested in this can be done with the help of IF statement and with the help of Parameters to make it more dynamic. So create a calculated field Selected Sales:

IF [Sub-Category]=[Select  a Sub-Category]
THEN [Sales] ELSE 0 END

Now right click on the parameter made earlier and select Show Parameter control. LOD6

  1. An LOD expression that excludes the category from grouping the sum of selected sales will total the selected sales across all rows. This will make it easy to compare the sales of each category to the selected category. So create a calculated field Sales of Selected Category : {EXCLUDE [Sub-Category]: SUM([Selected Sales])}.

  2. Now create another calculated field Difference from selected: SUM([Sales]) - SUM([Sales of selected category])

Now do the following changes in workseet to see difference in sales of each sub-category side by side. LOD6

  1. Now do the necessary formatting and modify tooltips as required. LOD6

Link to the created visualization

7. Average of top deals by sales rep