MIP Logo

15 Examples of Tableau LOD – Customer Order Frequency

This post was originally published on The Data School blog between 2018 and July 2025, before our program was renamed to MIP’s Analytics Career Accelerator. References throughout this article to “The Data School” or “DS” all refer to what is now MIP’s Analytics Career Accelerator. The program, its people, and its commitment to launching outstanding analytics careers remain the same – just under a new name.

If you are having trouble viewing this article, please report it here

Tableau LOD (Level of Detail) Expression is one of the most powerful tools to achieve amazing results in building dashboards. In this series of blogs, we will walk through 15 different use cases to demonstrate the usage of LOD expression.

Since this is a series blogs, please use the navigation below to jump to the one you need quickly:

Customer order frequency

When performing sales analysis, we may want to know how many customers only have only placed one order, and how many placed two, etc. So in this example, we could achieve this goal with Tableau LOD expressions.

  1. Connect to data source: in this example, we just use “Sample-Superstore” dataset from “Saved Data Sources”.

2. Define variable to show order number for each customer: let’s create a calculated field called “Customer Order Number” with a LOD expression shown as below image. After created, “Customer Order Number” shows in measure section by default.

3. Convert created field to dimension: in order to analyze customer number for each order number placed, we need to drag the field to dimension section.

After that we can see “Customer Order Number” becomes a dimension.

For now, when we drag “Customer Order Number” to rows, we can get a list of order numbers as shown in below image:

 

 

4. Create distribution: now let’s right click  “Customer Name” field and drag to “Columns” and select count distinct and we can get a viz shown below:

It is pretty close, but we still want a little improvement by swap the rows and columns. We could get a shape shown as below:

Now we get the distribution we have.

I also upload a example to Tableau public for reference, hope my blog helps a little bit.

 

Share this post