Forum Discussion
Calculate the previous segment
Hello,
I have a model with a RFM Segmentation, that is calculate for the period select.
However, now I would like to select a period, and calculate the last segment for those customers, what I want to say is, I don't want purchases from selected period to influence the segment calculation.
I see 2 possible solutions:
- freeze the costumers selected and see their behavior on last 12 months (before the minimum date of selected period)
- calculate the segments for each month, and add a new slicer related to the segmentation month
However I don't know how I can implement none of these solutions.
Someone can help me on this problem? How do you will fix this problem?
Thank you so much,
Raquel
3 Replies
- amitchandakSuper User
RaquelSantos_PT , if you need different values of RFM each month, then you need to create a column .
New column
var _mon = eomonth([Date],-13)+1
Var _max = [Date]
return
last 12 month of sales = sumx(filter(table,[customer] =earlier([cutomer) && [Date] >=_min && [Date] <=_max),[Sales])
This can be used in RFM
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- RaquelSantos_PTNew Member
Hello amitchandak ,
right now I calculate the RFM segment as a measure with the following code:
Clientes_RFM =var vToday = max('calendar'[date])Var vResult = CALCULATE('Cliente PT'[# Clientes],filter(VALUES('Dados OMS PT'[email]),[# Encomendas]>=min(Aux_RFM_Freq[Lim_Inf]) &&[# Encomendas]<=max(Aux_RFM_Freq[Lim_Sup]) &&[Cesta]>min(Aux_RFM_Monetary[Lim_Inf]) &&[Cesta]<=max(Aux_RFM_Monetary[Lim_Sup]) &&DATEDIFF([Ultima_Compra],vToday,DAY)>=min(Aux_RMF_Recency[Lim_Inf]) &&DATEDIFF([Ultima_Compra],vToday,DAY)<=max(Aux_RMF_Recency[Lim_Sup])))return vResultand I also have auxiliary tables to define the limits of the segments:I didn't understand how can calculate the segment of each customer by month.
Can you help me please?
Thank you,
Raquel
- AnonymousNot applicable
Hi RaquelSantos_PT ,
Is there any relationship created among the table Cliente PT, Dados OMS PT and those auxiliary tables? Could you please share the final result you want with an special example and correct value? Is the measure [Clientes_RFM] to get the cumulative number of customers for each interval segment? Thank you.
There are a couple of links below on RFM analysis, you can check them out. Hope they can help you.Using DAX for Customers Segmentation by RFM: Recency, Frequency and Monetary Value
RFM - Recency of latest purchase
Best Regards