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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Imran_Isshack
Frequent Visitor

Repost from earlier with sample data: PERCENTRANK FUNCTION - Equivalent in DAX

Hi Power Bi Friends,

I inherited an MS Excel model and wanted to transition it to Power Pivot so that It becomes dynamic. 

This Excel model has the PERCENTRANK FUNCTION, which I can't seem to find in DAX. 

Here is my Ms Excel Fromula. How can I mirror this in DAX Language?

 

PositionCompaniesCountMIN VALUEPERCENTRANKMAX VALUEPERCENTRANKAVERAGEPERCENTRANK
Partners  $%$%$%
 Ace Store5$18,45019%$28,12530%$23,28823%
 Acme Corporation 12$14,62513%$54,00094%$34,31336%
 Cupcake LLC2$13,0509%$15,07514%$14,06312%
 Éclair Inc6$31,50031%$43,87567%$37,68842%
 Grant & Eisenhoffer P.A.2$20,25022%$33,75034%$27,00028%
 Globex Corporation4$10,1250%$12,3755%$11,2501%
 Home Furnishing8$39,37552%$58,50098%$48,93886%
 Hooli8$32,62533%$46,12581%$39,37552%

 

 

 

Rate             Graded Position    Position       Type               Firm
$24,750Senior AssociatePartnerCategory AAce Store
$18,450Senior AssociatePartnerCategory AAce Store
$26,100Senior AssociatePartnerCategory AAce Store
$21,375Senior AssociateAssociateCategory AAce Store
$28,125Senior AssociatePartnerCategory AAce Store
$24,975Financial AnalystFinancial AnalystCategory AAce Store
$26,775InvestigatorPartnerCategory AAce Store
$26,775InvestigatorInvestigatorCategory BAce Store
$18,000InvestigatorInvestigatorCategory BAce Store
         
          
          
          
          
          
          
          
          
          

 

 

 

=PERCENTRANK(IF(Plaintiff_AllData[Position]="Partner",IF(Plaintiff_AllData[Type]="Category A",Plaintiff_AllData[Rate])),D3)

 

I) The positions refer to Job tiles

ii) Rates are billing Rates per employee, used to bill clients

iii)Type is a category of employees

 

Is there a way to simulate this MS Excel formula in DAX?

Imran

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi ,  @Imran_Isshack 

For your need , you want to convert the "PERCENTRANK FUNCTION" to dax . Right?

As searched , there is no PERCENTRANK function in DAX, you can manually calculate it from the results of RANKX and COUNTROWS.

For more information, you can refer to :

powerbi - DAX equivalent of Excel PERCENTRANK.INC per category - Stack Overflow

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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-yueyunzh-msft
Community Support
Community Support

Hi ,  @Imran_Isshack 

For your need , you want to convert the "PERCENTRANK FUNCTION" to dax . Right?

As searched , there is no PERCENTRANK function in DAX, you can manually calculate it from the results of RANKX and COUNTROWS.

For more information, you can refer to :

powerbi - DAX equivalent of Excel PERCENTRANK.INC per category - Stack Overflow

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

 

 

@v-yueyunzh-msft 

 

Thanks very much for your response.

Yes, I would like the DAX equivalent of Excel's PERCENTRANK.

You're right, I have been searching google for a few days now and can't seem to find the equivalent. 

I saw this post before "powerbi - DAX equivalent of Excel PERCENTRANK.INC per category - Stack Overflow" but it seems so long and complicated and scared me away 🙂 . I do hope I would be able to use this successfully.

 

Imran

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors