LOD functions used for segmentation

Every marketing strategy starts with a customers’ segmentation. You can group your customers by their age, their sex, their education, their address, their marital status or by their sales numbers. A good segmentation is a key to optimization of your marketing efforts.

Today to create a customers’ classification we will use our sales data. Knowing that 2013 is the most recent year we have in our database let’s start with calculating sales numbers for 2013. As you remember, in my last article (learn more) I explained how we can create a calculated field to measure the Profits in 2013. We will use this field to create our Sales 2013 field. You can proceed as follows

Duplicate a Calculated Field in Tableau

Customers Segmentation using the IF formula

Now as you have your Sales 2013 field, you can create your segments. We will divide our customers into four groups using the IF formula

  • A Customers having ordered for more than 5000 dollars
  • B Customers having ordered for more than 2500 dollars
  • C Customers having ordered for more than 1250 dollars
  • D Customers having ordered less than 1250 dollars

It goes without saying that you can select only three segments, decide to make your segmentation based on the profit indicator etc…

If formula in Tableau to create a segmentation

Let’s now use our newly created field to analyze our customers’ numbers per segment. Double click on your Segment and on Customer Name. Even though it’s not exactly what we expected we can see a list of customers with a color code showing if it’s an A customer or a B/C/D one. As we want to have a number of customers per segment, we will transform our Customer Name pill into a measure CNTD(Customer Name). Something went definitely wrong as we now have only A CUSTOMERS.

Bar chart in Tableau customers segments

Level of Detail formula to manage your segments

Let’s duplicate our Segment field and make some small, but extremely important changes. This is a typical situation where we need to use an LOD (Level on Detail) formula. Whereas a concept is quite difficult to explain, it becomes really obvious when we have some concrete examples. We will use the FIXED formula on the Customer Name level. Basically, we will say to Tableau to create our segmentation based on the Sales 2013 aggregated on the customer level.

LOD fixed formula based on sales

As you can see our first calculated field (Segments) is a measure, whereas the second one (Segments LOD) is a dimension. Let’s bring it to our view (by double-clicking), now we can easily see the distinct segments of our customers. The D segment is the most important one. Of course, you can change the sales ranges if needed or even give the control to your users through the parameters to determine the ranges of sales defining each segment.

Number of Customers based on LOD function

And more importantly, we can now analyze different kind of indicators based on our segmentation. You can use bar chart, tables and whatever you want to bring your insights to the customers’ analysis!

Table with additional indicators per customers segment

Share your way of analyzing your customers!


Spread the love