Forum Discussion
Using Percentiles Based On Column
- 4 years ago
Hi, joshuar
First of all, the output result you gave about C should be wrong, correct as shown in the figure.
Second, if you want to calculate by group, you can change the formula PERCENTILEX.INC.
PERCENTILEX.INC function (DAX) - DAX | Microsoft Learn
Measure = SWITCH( TRUE(), MAX('RFM Table'[F Value])<= PERCENTILEX.INC(FILTER(ALL('RFM Table'),[Customer Group]=SELECTEDVALUE('RFM Table'[Customer Group])),[F Value],0.2), "1", MAX('RFM Table'[F Value])<= PERCENTILEX.INC(FILTER(ALL('RFM Table'),[Customer Group]=SELECTEDVALUE('RFM Table'[Customer Group])),[F Value], 0.40 ), "2", MAX('RFM Table'[F Value])<= PERCENTILEX.INC(FILTER(ALL('RFM Table'),[Customer Group]=SELECTEDVALUE('RFM Table'[Customer Group])),[F Value], 0.60 ), "3", MAX('RFM Table'[F Value])<= PERCENTILEX.INC(FILTER(ALL('RFM Table'),[Customer Group]=SELECTEDVALUE('RFM Table'[Customer Group])),[F Value],0.80 ), "4", "5")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.
Hi, joshuar
First of all, the output result you gave about C should be wrong, correct as shown in the figure.
Second, if you want to calculate by group, you can change the formula PERCENTILEX.INC.
PERCENTILEX.INC function (DAX) - DAX | Microsoft Learn
Measure = SWITCH(
TRUE(),
MAX('RFM Table'[F Value])<= PERCENTILEX.INC(FILTER(ALL('RFM Table'),[Customer Group]=SELECTEDVALUE('RFM Table'[Customer Group])),[F Value],0.2), "1",
MAX('RFM Table'[F Value])<= PERCENTILEX.INC(FILTER(ALL('RFM Table'),[Customer Group]=SELECTEDVALUE('RFM Table'[Customer Group])),[F Value], 0.40 ), "2",
MAX('RFM Table'[F Value])<= PERCENTILEX.INC(FILTER(ALL('RFM Table'),[Customer Group]=SELECTEDVALUE('RFM Table'[Customer Group])),[F Value], 0.60 ), "3",
MAX('RFM Table'[F Value])<= PERCENTILEX.INC(FILTER(ALL('RFM Table'),[Customer Group]=SELECTEDVALUE('RFM Table'[Customer Group])),[F Value],0.80 ), "4", "5")
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 ,
I am geting all 5s for the F Score for all customer ID?
Thanks for your support!