Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Return Value with Highest Rank against all Rows

Hi Folks,

 

So I want to return the value of the highest Ranked Product (from RankX) within an Order number and have that shown against EACH row in that Order.. example:

 

Order#        Product          Value          Rank           Number 1 Product on Order

1                 Server             100             2                 Storage

1                 Storage           500            1                  Storage

1                 Networking     50              3                  Storage

2                 Client            1000             1                 Client

2                 Storage           500            2                  Client

2                 Cables             50              3                  Client

 

So in the example I have ranked my Products by Value and now I want to return the number 1 product against each row, in the above example Storage should apply for each row for Order 1 and Client for Order 2.

 

My googling skills struggled to find a match for what im trying to do.


Thanks in advance for any help you can provide.

  • Anonymous 

     

    Try this calculated column for number 1 product

     

    I assume that RANK is a calculated column

    Column =
    CONCATENATEX (
        FILTER ( Table1, [Order#] = EARLIER ( [Order#] ) && [Rank] = 1 ),
        [Product],
        ","
    )
    

     

     

2 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Icon for Community Champion rankCommunity Champion

    Anonymous 

     

    Try this calculated column for number 1 product

     

    I assume that RANK is a calculated column

    Column =
    CONCATENATEX (
        FILTER ( Table1, [Order#] = EARLIER ( [Order#] ) && [Rank] = 1 ),
        [Product],
        ","
    )
    

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Worked perfectly thank you very much :)