- rds team

# Tableau data in use: How to measure customer loyalty.

Updated: Sep 3, 2020

In the previous article on Tableau data in use, we explored on how to segment customers based on different institution metrics like profit. This article seeks to extend our discussion on use of data in decision making by exploring how to measure customer loyalty. We assume the position of the founder of '**Brand X**' startup which sells clothes online. As the individual tasked with leading the company to greater heights, I don't feel well informed by the data am collecting. Actually, I even don't know how often my customers are purchasing my products (customer loyalty). My data partially resembles the Superstore data set packaged with Tableau app, see below;

Just like the Superstores data set above, my data has the field '**Order ID**' (i.e

A unique identifier of customer order) and '**Customer ID**' (i.e A unique identifier for every customer). Using these two fields in my data, I want to measure;

The number of customers who made a certain number of orders? (Customer Loyalty).

Tableau always has an easier way of answering such questions, connect to the data set above and follow along to learn.

**Step 1: One way quick solution**

This is the simplest way to answer this question, however it's not satisfying as it should be, since it doesn't quantify our metrics together.

Drag

**Customer ID**to the Column(s) shelf.Drag count distinct of

**Order ID**to the Row(s) shelf.Sort by Count distinct

**Order ID**, see below.

From the above results, we can see the number of customers who made 13 orders were seven, however this is tedious as it involves us counting the instances. Lets, find more quantifiable approach.

**Step 2: Using LOD to build a better solution**

The second method involves use of Tableau LOD to answer our question. We'll use **FIXED** level of detail to compute the number of orders made by each customer. See below.

Now, let build our solutions;

Drag the calculated field '

**Number of orders per customer**' from the measures to dimensions.Next, drag the field '

**Number of orders per customers**' from the dimension field to the column(s) shelf.Drag count distinct of

**Customer ID**to the row(s) shelf.

See results;

The resulting chart doesn't differ numerically from the previous one, it only quantifies our previous results in a far much engaging way to the users. One can tell without scrolling and counting that 134 customers made five orders. A single customer ordered 17 times. This gives, decision makers far much better understanding of who their customers is. As the founder of '**Brand X**', I can respond to any customer loyalty challenges revealed by analyzing my data and thus apply the necessary measures before my ship sinks.

I hope, after reading this article you'll find the usefulness of data within your organization, and take the first step of questioning your data. You never know what you will find out.

Just begin.