Forum Discussion

hixkim's avatar
hixkim
Frequent Visitor
4 years ago
Solved

Rank based on multiple fields

Hello - hoping someone is able to help me out with this, I'm a little out of my depth. I think either a column or DAX would work for me.  Ultimately I want to rank a vendor's weekly pricing lowest t...
  • themistoklis's avatar
    4 years ago

    Hello hixkim 

     

    Create a new calculated column with the following formula:

    Sorting Column = 
    RANKX (
        FILTER ( 'Table', 'Table'[Year-Week] = EARLIER ( 'Table'[Year-Week] ) && 'Table'[Item Number] = EARLIER ( 'Table'[Item Number] ) ),
        'Table'[Unit Cost],
        ,
        ASC,
        DENSE
    )
    

     

    Workspace Attached