**Description**:

The workbook includes calculations of RFM segments and basic views on top of that.

For those who not interested in the whole story, the final calculations are

under **RFM Dim** Folder in **Dimensions**, and complimentary **RFM Dim** views.

For those who have a spare time to walk through, the journey began

in March 2014 with the foundational blog article by Bora Beran :

Recency, Frequency, Monetary analysis in Tableau | Bora Beran

Bora used RANK_PERCENTILE() Table Calculation along each (R F & M) scale,

and his approach is reflected in the current workbook -- with the calculations found under

**RFM Table Calcs** Folder (in Measures). The first seven views are based on that logic.

The main complication is that the model is based solely on Table Calculations.

There are the consequences of that approach, below are just two main points.

First, to re-use the results (calculated RFM segments for each Customer / Period)

one need to materialise them -- either by exporting view data to a file

or by copy-pasting into the new Clipboard datasource to use in place.

These manual steps have to be repeated upon any change in the process.

Second, analysing segmentation results on-the-fly -- counting Customers in segments,

calculating boundaries, aggregating other useful metrics, such as Sales Amount --

becomes harder if possible at all. One outta use fancy viz techniques and calculations

just to get a minimum level of sense-making of the data (see views 5th to 7th).

Besides, I've been surprised (several times) to find the packed bubbles

to be especially effective when explaining RFM segmentation

to those (uninitiated) unfamiliar with the topic :-)

To overcome the complexity of making RFM all Table Calcs

one needs to figure out how to implement them as **Dimensions**.

The approach would be using **PERCENTILE()** -- the **aggregate** calc --

inside a LOD expression, which could be wrapped in a FIXED LOD.

The feasibility of this approach became obvious when I first saw

Shinichiro Murakami answering the question about

Answering the thread ends up with the calculations very similar

to those used for Frequency (the F component of RFM model).

They are summarised in the **RFM F Workout** section of the workbook

(the Folder in Measures and the View of the same name).

And making **RFM Dimensions** from that seems relatively straightforward.

End of the story :-)

**Screenshot**:

**Tableau Version**:* **10.0*

**Original Author**: Yuriy Fal

PS UPDATED the workbook, added simplified

(all FIXED) versions of RFM Dim calculations.

They're named as **[RFM ... -- SR]** --

huge thanks to Simon Runc,

who had just re-invented it here:

PPS Jul-28, 2018 UPDATE:

Added a **simplified** workbook -- no RFM Segmentation Periods,

**Quartiles** instead of Quintiles, hence R, F & M Codes **1 to 4** --

together with a complementary **Tableau Prep Workflow**:

The flow would allow doing the actual RFM Segmentation right in Prep,

then joining the final **RFM Codes** table to any target dataset ( ON [Customer ID] ).

Renamed the original workbook to RFM_Original_v10.0.twbx

## Comments