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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
srikant
Frequent Visitor

how to calculate percentile and values for rows in a column and arrange the as per percentile values

percentile.PNG

This is how I desire the data to look like, can anyone help me please 

1 ACCEPTED SOLUTION

Hi @srikant,

 

Did you use the formula like this in Excel?

 

=PERCENTRANK.EXC(H2:H13,H2)

We can create a calculated column as below to work on that in Power BI desktop. 

 

Column = VAR _ROW1 = CALCULATE(COUNTROWS(Table1),Table1[a]<=EARLIER(Table1[a]))
VAR _ROW2 = CALCULATE(COUNTROWS(Table1),ALL(Table1))
RETURN
_ROW1/_ROW2

 

23.PNG

 

 

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

9 REPLIES 9
Greg_Deckler
Super User
Super User

Where are the %'s coming from?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

The above screenshot is of Excel sheet where I percentrank.exc function to calculate percentile and the values that I got were between 0.1to 1.0 then I converted these number to percentagespercentiles 0-1.PNG 

OK, so your source data is like you show below and you want to do what with it? I don't understand the issue I guess.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

My source data is column a, just with the numbers and column b shows percentile values of each number in column a. I have been trying to do the same in powerbi but it is not happening  

Hi @srikant,

 

Did you use the formula like this in Excel?

 

=PERCENTRANK.EXC(H2:H13,H2)

We can create a calculated column as below to work on that in Power BI desktop. 

 

Column = VAR _ROW1 = CALCULATE(COUNTROWS(Table1),Table1[a]<=EARLIER(Table1[a]))
VAR _ROW2 = CALCULATE(COUNTROWS(Table1),ALL(Table1))
RETURN
_ROW1/_ROW2

 

23.PNG

 

 

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

according to your example I  want to made this percentile formula dynamic  as measure.  

from picture below i want to create a measure to show percentile of each branch_name base on principle they ve made.

Now i ve noidea what to do. thanks

 

 

Capture.PNG

Yeah, I used percentrank.exc formula

Hi @srikant,

 

Did you try the way as I shared?

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi @srikant ,

 

Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.