Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I have a table which has one line per Step and a Column for a SUM how often the Step occured.
I am creating a CDF for this table. That works fine.
But I am not able to calculate a P10. The values are not correct.
I tried it in this way.
| Step | SUM_Events |
| 1 | 5 |
| 2 | 20 |
| 3 | 40 |
| 4 | 20 |
| 5 | 50 |
Solved! Go to Solution.
You're correct — the issue stems from misunderstanding how PERCENTILEX.INC works. This function treats the column values equally and doesn’t weight them based on frequency (your SUM_Events). To calculate P10 (10th percentile) correctly from a cumulative distribution, you need to weight the steps by frequency.
Here’s how you can implement a correct weighted percentile calculation using DAX:
P10_Correct = VAR TotalEvents = SUMX(ALL(Tabelle1), Tabelle1[SUM_Events]) VAR PctTarget = 0.1 * TotalEvents RETURN MINX( FILTER( ADDCOLUMNS( SUMMARIZE(Tabelle1, Tabelle1[Step]), "CumSum", CALCULATE(SUM(Tabelle1[SUM_Events]), FILTER(ALL(Tabelle1), Tabelle1[Step] <= EARLIER(Tabelle1[Step]))) ), [CumSum] >= PctTarget ), Tabelle1[Step] )Explanation:
Optional: You can enhance the precision by interpolating between steps if needed, but this provides the correct step-level P10.
Try using this measure in your report and compare the result with your expected percentile. Let me know if you want to add interpolation for exact value.
✔️ If my message helped solve your issue, please mark it as Resolved! 👍 If it was helpful, consider giving it a Kudos! |
You're correct — the issue stems from misunderstanding how PERCENTILEX.INC works. This function treats the column values equally and doesn’t weight them based on frequency (your SUM_Events). To calculate P10 (10th percentile) correctly from a cumulative distribution, you need to weight the steps by frequency.
Here’s how you can implement a correct weighted percentile calculation using DAX:
P10_Correct = VAR TotalEvents = SUMX(ALL(Tabelle1), Tabelle1[SUM_Events]) VAR PctTarget = 0.1 * TotalEvents RETURN MINX( FILTER( ADDCOLUMNS( SUMMARIZE(Tabelle1, Tabelle1[Step]), "CumSum", CALCULATE(SUM(Tabelle1[SUM_Events]), FILTER(ALL(Tabelle1), Tabelle1[Step] <= EARLIER(Tabelle1[Step]))) ), [CumSum] >= PctTarget ), Tabelle1[Step] )Explanation:
Optional: You can enhance the precision by interpolating between steps if needed, but this provides the correct step-level P10.
Try using this measure in your report and compare the result with your expected percentile. Let me know if you want to add interpolation for exact value.
✔️ If my message helped solve your issue, please mark it as Resolved! 👍 If it was helpful, consider giving it a Kudos! |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 56 | |
| 56 | |
| 35 | |
| 18 | |
| 14 |