cancel
Showing results for
Did you mean:

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Frequent Visitor

## RFM Score and filtering different categories

I want to creat an RFM of all my clients but at the same time recalculate the score when filtering the sales categories.

I have a data based that has;

• Client_ID
• Client_Name
• Category_ID
• Material
• Transaction_date
• Amount

For the the RFM values I'm using the these measures;

Recency = DATEDIFF(MAX(Sales [Transaction_date]), TODAY(), DAY)
Frecuency = DISTINCTCOUNT(Sales [Transaction_date])
Monetary = SUM(Sales[Amount])

I created another table summarizing my client ID and the RFM value
RFM = SUMMARIZE
(
Sales, Sales[Client_ID],
Sales[Client_ID],
"R Value", [Recency],
"F Value", [Frecuency],
"M Value", [Monetary])

Since I want to rank them according to their percentile, I created a calculated column for the rank
Nivel Rt = SWITCH (
TRUE (),
[R value] <= PERCENTILE.INC ( RFM[R Value], 0.20 ), "5",
[R value] <= PERCENTILE.INC ( RFM[R Value], 0.40 ), "4",
[R Value] <= PERCENTILE.INC ( RFM[R Value], 0.60 ), "3",
[R value] <= PERCENTILE.INC ( RFM[R Value], 0.80 ), "2",
"1"
)

Doing all these I can get an RFM score for all my clients. However, if I try to filter my categories of sales the score doesn't change or recalculates itself. what it does. it's filter the amount of clients of that category and it gives them the same score. Any help appreciated.
5 REPLIES 5
Solution Sage

@TapiaMercasid Provide samples of your data

__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com
Frequent Visitor

I don't know the most efficient way to share this data, so here I share a wetransfer link.

https://we.tl/t-TawCXNgBql

Best regards,

Community Support

Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Frequent Visitor

Hello @v-zhangti I don't know if the data I provided can help. I can also share the pbix file and the data. let me know. I'm really trying to solve this issue.

Frequent Visitor

I don't know the most efficient way to share this data, so here I share a wetransfer link.

https://we.tl/t-TawCXNgBql

Best regards,

Announcements

#### Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors