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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Percentile by Row

Hello,

 

I have this column that i want to calculate using PERCENTILE.EXC

DateProductX
1/2/1990A0.01779078
1/3/1990A-0.002563704
1/4/1990A-0.008178207
1/5/1990A-0.00973771
1/8/1990A0.004599524
1/9/1990A-0.011788233
1/10/1990A-0.006576845
1/11/1990A0.003511217
1/12/1990A-0.024519231
1/11/1990B0.003511217
1/11/1990C0.003511217

 

Percentile 10% = PERCENTILE.EXC(A TABLE, 0.1)
Difference = (A-Percentile 10%)^2

This should be the end result (When I Filter Product A on a slicer).
*the one i got stuck is how to use Percentile 10% on each row.

 

DateProductXPencertile 10%Difference
1/2/1990A0.017791-0.0245192310.001790137
1/3/1990A-0.00256-0.0245192310.000482045
1/4/1990A-0.00818-0.0245192310.000267029
1/5/1990A-0.00974-0.0245192310.000218493
1/8/1990A0.0046-0.0245192310.000847902
1/9/1990A-0.01179-0.0245192310.000162078
1/10/1990A-0.00658-0.0245192310.000321929
1/11/1990A0.003511-0.0245192310.000785706
     
1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

According to your needs, you want to use the PERCENTILE function to get the result you want. First of all, I checked your DAX formula and found that there is something wrong with the setting of the second parameter in your PERCENTILE function. You can check the official document first, PERCENTILE.EXC (< column >, < k >), where if K is zero or blank, percentage range of 1 / (n + 1) returns the smallest value. If zero, it is out of range and an error is returned; if K is not a multiple of 1 / (n + 1), PERCENTILE.EXC Will interpolate to determine the value at the k-th percentile. So when you set the parameter to 0.1, you don't get -0.024519231. I did the following test, created two calculated columns, and got the result you want under slicer's filter.

 

v-henryk-mstf_0-1609983916910.jpeg

v-henryk-mstf_1-1609983924412.png

v-henryk-mstf_2-1609983938990.png

v-henryk-mstf_3-1609983946492.png

Here is the sample pbix file.


Best Regards,
Henry

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

View solution in original post

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

According to your needs, you want to use the PERCENTILE function to get the result you want. First of all, I checked your DAX formula and found that there is something wrong with the setting of the second parameter in your PERCENTILE function. You can check the official document first, PERCENTILE.EXC (< column >, < k >), where if K is zero or blank, percentage range of 1 / (n + 1) returns the smallest value. If zero, it is out of range and an error is returned; if K is not a multiple of 1 / (n + 1), PERCENTILE.EXC Will interpolate to determine the value at the k-th percentile. So when you set the parameter to 0.1, you don't get -0.024519231. I did the following test, created two calculated columns, and got the result you want under slicer's filter.

 

v-henryk-mstf_0-1609983916910.jpeg

v-henryk-mstf_1-1609983924412.png

v-henryk-mstf_2-1609983938990.png

v-henryk-mstf_3-1609983946492.png

Here is the sample pbix file.


Best Regards,
Henry

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

parry2k
Super User
Super User

@Anonymous you can do it by adding the following columns:

 

Percentile 10% = PERCENTILE.EXC(Table[A], .01)

Differnce = (Table[A] - Table[Percentile 10%]^2

 

Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.