I have been tasked with converting a a worksheet from standard Excel into PowerPivot. However, I have hit a roadblock with the PERCENTRANK.INC function which is not available in DAX. I have come close to replicating it using a formula, but there are definite differences in the calculation.
Does anyone know how Excel calculates PERCENTRANK.INC()?
Formula in cell D2: =(COUNT($A$2:$A$10)-B2)/(COUNT($A$2:$A$10)-1)
Formula in cell B2: =RANK.EQ(A2,$A$2:$A$10,0)
Formula in cell C2: =PERCENTRANK.INC($A$2:$A$10,A2)
Edit:
It's seems strange to me that there are so many "standard" ways to calculate
PERCENTRANK
that has have slightly different results.Using your example of your 9-number set of
1,2,3,4,4,6,7,8,9
, depending on which "authority" I used, the third value (3
) had a Percent Rank of25.0%, 27.0%, 27.8% or 30.0%
.Obviously we'll go with the one that gives your desired result, matching
PERCENTRANK.INC
.so, if our range of
1,2,3,4,4,6,7,8,9
is inA1:A9
, we could use this formula inB1
:...and copy or "fill" it down for results:
Original Answer
(Source)
For reference here is the DAX formula based off ashleedawg's answer which includes ignoring cells with no values in them.