Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Dynamic Customer Segmentation

Hi Experts,

 

I'm building a RFM Model, a Dynamic Customer Segmentation Model. 
Formerly I made it in method 1 (upper part) and it is successful, but now I would like to make it advanced to use method 2 (lower part). the result would be vary with the selected category and selected period.

 

Let me explain the model below first. 

SimonChung_GGGG_7-1646320306508.png

 

 

Method 1
There are 3 factors Recency, Frequency and Monetory in this model, each factor split into 3 rank

In a selected period and selected cateogry,
A customer has transaction less then 30day treat as R1, 31-90 days as R2, >90 day as R3
The customer has transaction in the selected period, frequency larger than 25 treat as F1, so on...
The customer spending money larger than 10001 treat as M1, so on...  

SimonChung_GGGG_0-1646317857656.pngSimonChung_GGGG_1-1646317866045.pngSimonChung_GGGG_2-1646317875054.png

Then it will come out maximum 27 (3x3x3) combinations as the picture shown.
The summary table (right) can be interactive with the Detail Table (left) as well. 

SimonChung_GGGG_5-1646318533475.png

 

Method 2

Now I would like to make an advanced model. 

In method 2 I would not provide a fixed criteria, but split each 3 factors into quartiles instead. 
So that, for example 50days is selected, Recency for 0-10days treast as R4, 11-20 as R3... etc
Frequency and Monetary are similar case.

 

The details table is OK, however it failed to make the Summary table. 
I did think that the case would be similar to method 1, but it's not.

SimonChung_GGGG_6-1646319235432.png

 

How should I do to make the Summary table, it can also have interaction to Details table? Thank you so much!

PBIX:  RFM Demo v2.pbix

Expected summary result (for selection period 1/1/19 to 31/12/19):  METHOD 2 - DETAILS.xlsx 

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Because you applied the [Active Customers #] <> Blank filter in this visual,

 

vkkfmsft_0-1646807926314.png

 

you need to adjust the formula to:

 

Active Customers #2 = 
    CALCULATE(
        DISTINCTCOUNT('FactSales'[Customer ID]), 
        FILTER(
            FILTER ( VALUES ( DimCustomer[Customer ID] ), [Active Customers #] <> BLANK () ),
            [Recency Score] >= MIN (Seg2_Recency[Min]) && [Recency Score] <= MAX (Seg2_Recency[Max]) && 
            [Frequency Score] >= MIN (Seg2_Frequency[Min]) && [Frequency Score] <= MAX ( Seg2_Frequency[Max] ) &&
            [Monetary Score] >= MIN (Seg2_Monetary[Min]) && [Monetary Score] <= MAX ( Seg2_Monetary[Max] )
        )
    )

vkkfmsft_1-1646807977367.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Because you applied the [Active Customers #] <> Blank filter in this visual,

 

vkkfmsft_0-1646807926314.png

 

you need to adjust the formula to:

 

Active Customers #2 = 
    CALCULATE(
        DISTINCTCOUNT('FactSales'[Customer ID]), 
        FILTER(
            FILTER ( VALUES ( DimCustomer[Customer ID] ), [Active Customers #] <> BLANK () ),
            [Recency Score] >= MIN (Seg2_Recency[Min]) && [Recency Score] <= MAX (Seg2_Recency[Max]) && 
            [Frequency Score] >= MIN (Seg2_Frequency[Min]) && [Frequency Score] <= MAX ( Seg2_Frequency[Max] ) &&
            [Monetary Score] >= MIN (Seg2_Monetary[Min]) && [Monetary Score] <= MAX ( Seg2_Monetary[Max] )
        )
    )

vkkfmsft_1-1646807977367.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thanks so much!
btw, I think you have typo, I change to dimCustomer instead then it works, 

SimonChung_GGGG_0-1646834562218.png

 

lbendlin
Super User
Super User

You can use DAX Studio to examine your measures and optimize their performance.  For Active Customers #2 you can  vastly improve performance by avoiding recalculation of your measures.

 

Active Customers #2 = 
    var r = [Recency Score]
    var f = [Frequency Score]
    var m = [Monetary Score]
return  CALCULATE(
        DISTINCTCOUNT('FactSales'[Customer ID]), 
        FILTER(
            VALUES('FactSales'[Customer ID]),
            r >= MIN (Seg2_Recency[Min]) && r <= MAX (Seg2_Recency[Max]) && 
            f >= MIN (Seg2_Frequency[Min]) && f <= MAX ( Seg2_Frequency[Max] ) &&
            f >= MIN (Seg2_Monetary[Min]) && f <= MAX ( Seg2_Monetary[Max] )
        )
    )
Anonymous
Not applicable

Really thank you for your reply.
However, it doesn't work.

SimonChung_GGGG_1-1646465854149.png

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.