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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
DimaMD
Solution Sage
Solution Sage

RFM segments

Hello community!

 

I've made RFM analysis in table. Score of RFM is calculated in real time with mesure.

 

I have another table with scores and names of segments. so every combined RFM score has it's own name.

 

The goal is to connect 2 tables so we can see name of segment in every customer score in table 1. But i can not do so because RFM score is calculated as mesure, and I can't figure out how to connect table with name of segments with main table. 

 

Please help me to solve this task. 

 

Example of PBIX file will be in attachment. 


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com
1 ACCEPTED SOLUTION

HI, @HotChilli 
thanks for the tip, yesterday I managed to figure it out myself and write such a measure.
I think someone will find this measure useful

 

Segment RFM = 
VAR _tab = 
SELECTCOLUMNS(
    VALUES('Sales'[ID_USER]),
    "RFM_Seg",[RFM] )
VAR _Seg =
SELECTCOLUMNS(_tab,
    "#RFM_S",
    LOOKUPVALUE('Segment'[Segment],Segment[ID_RFM],[RFM_Seg]))
return
MAXX( _Seg,[#RFM_S])

 

Screenshot_7.jpg


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com

View solution in original post

10 REPLIES 10
TapiaMercasid
Frequent Visitor

HI @DimaMD I'm having some issues with an RFM I'm trying to create from scratch. I see you are pretty knowledgeable. can you help me with this?
https://community.fabric.microsoft.com/t5/Desktop/RFM-Score-and-filtering-different-categories/m-p/3... 

Nura_Berdy
Frequent Visitor

Hi Dima,

 

I am had the same issue. But I am wondering if you can share how you segments table looks like. I am still having issues even after connecting segments tbale with my RFm scores. Thank you! 

 

Best,

 

Nura 

Hi @Nura_Berdy  save the file, I think you will see everything there
example file pbix

greetings from Ukraine


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com

Hi Dima,

Thank you very much for sending the above file. It was very useful, however I am still getting the same error that you had. Also, after reviewing your file I realised that you have the same segment name for 

each RFM score. Did you happen to fix that? Thank you! 

 RFMRFM

Hi @Nura_Berdy , Can you provide a sample of your data?


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com
v-robertq-msft
Community Support
Community Support

Hi, 

Glad to hear that you have solved your problem by yourself, would you like to mark your own reply as a solution so that others can learn from it too?

Thanks in advance!

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

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

HotChilli
Super User
Super User

Are you looking to return text from Segment column dependent on exact match with RFM measure with of ID_RFM column?

If yes, create a measure, put RFM in a variable and use LOOKUPVALUE to return Segment

HI, @HotChilli 
thanks for the tip, yesterday I managed to figure it out myself and write such a measure.
I think someone will find this measure useful

 

Segment RFM = 
VAR _tab = 
SELECTCOLUMNS(
    VALUES('Sales'[ID_USER]),
    "RFM_Seg",[RFM] )
VAR _Seg =
SELECTCOLUMNS(_tab,
    "#RFM_S",
    LOOKUPVALUE('Segment'[Segment],Segment[ID_RFM],[RFM_Seg]))
return
MAXX( _Seg,[#RFM_S])

 

Screenshot_7.jpg


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com

Hello @DimaMD 
Were ALL the RFM fields R(Values), R(Score), F(Values), F(Score), M(Values), and M(Scores) created completely using just measures, or some were created using calculated columns?

Would appreciate it so much if you can share the pbix please with me, as I'm trying to find a way to do it all based just on measures, but unfortunately I found that all sources are using calculated tables and columns.

 

Best regards,

Simon

Hi @y5famfnatudu Your File


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.