Forum Discussion

Imran_Isshack's avatar
Imran_Isshack
Frequent Visitor
3 years ago
Solved

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

  • 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

     

     

2 Replies

  • 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