Forum Discussion

iamprajot's avatar
iamprajot
Icon for Responsive Resident rankResponsive Resident
9 years ago
Solved

Rank Table A according to Table B based on Decreasing Column

I want to Rank Table A according to Table B based on Decreasing Unit Price. Something like this. Table A       Table B   SupplierID UnitPrice Rank   SupplierID City 1 81 1   ...
  • v-jiascu-msft's avatar
    v-jiascu-msft
    9 years ago

    Hi iamprajot,

     

    The other columns affect the result. Try this formula please. I added another column in the sample.

    Measure (or Calculated column) =
    CALCULATE (
        RANKX ( ALL ( 'TableA'[UnitPrice] ), CALCULATE ( SUM ( 'TableA'[UnitPrice] ) ) ),
        ALLEXCEPT ( TableA, TableA[SupplierID], TableA[UnitPrice] )
    )

     

     

     

     

     

     

     

     

     

     

     

    Best Regards!

    Dale