Forum Discussion

harry6810's avatar
harry6810
Frequent Visitor
2 years ago
Solved

ORDER BY Statement

Hello! I have two main datasets connected by relationships through separate tables for specific features. Is there any way to sort my power pivot from highest to lowest value with using measure? Exp...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi harry6810 ,

     

    We can create a rank measure.

    index =
    RANKX ( ALL ( 'Table' ), 'Table'[Units], MAX ( 'Table'[Units] ), DESC, DENSE )
    

    Then the result is as follows.

     

    If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

     

    Best Regards,

    Neeko Tang

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