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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
TapiaMercasid
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
DimaMD
Solution Sage
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

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,

v-zhangti
Community Support
Community Support

Hi, @TapiaMercasid 

 

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.

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.

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,

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.