Forum Discussion
RFM segments
- 4 years ago
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 usefulSegment 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])
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
- DimaMD4 years agoSolution Sage
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 usefulSegment 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])- y5famfnatudu3 years agoResolver I
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
- DimaMD3 years agoSolution Sage
Hi y5famfnatudu Your File