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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
    Sales, 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",
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.
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:

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


Best regards,

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.


Best regards,

Helpful resources

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.