Forum Discussion

IB's avatar
IB
Frequent Visitor
3 years ago
Solved

Ranking column base on virtual table column

I need to add a new column  RANKING  "PBND(Hrs)" column in this virtual table

PBN =

SUMMARIZE (

    Table1,

    Table1[Step],

    "Units", DISTINCTCOUNT ( Table1[Job_No] ),

    "AllowTime", MAX ( Table1[Allowable (hrs)] ),

    "StepAccuTime", SUM ( Table1[Bucket-time] ),

    "TimeExpected", ( DISTINCTCOUNT ( Table1[Job_No] ) * MAX ( Table1[Allowable (hrs)] ) ),

    "PBND(Hrs)", SUM ( Table1[Bucket-time] ) - ( DISTINCTCOUNT ( Table1[Job_No] ) * MAX ( Table1[Allowable (hrs)] )),

    "Sort",MAX(Table1[Bucket]))

umn  RANKING  "PBND(Hrs)" column in this virtual table

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi IB ,

     

    Please add a column to the PBN table.

    RANKING PBND(Hrs) = RANKX(PBN, PBN[PBND(Hrs)], , DESC, Dense)

    This formula will rank the values of the PBND(Hrs) column in descending order and assign the same rank to ties.

    You can adjust the formula according to your needs, such as changing the order or the tie mode.

     

    Please refer to this for more information.

     

    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. 

     

     

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi IB ,

     

    Please add a column to the PBN table.

    RANKING PBND(Hrs) = RANKX(PBN, PBN[PBND(Hrs)], , DESC, Dense)

    This formula will rank the values of the PBND(Hrs) column in descending order and assign the same rank to ties.

    You can adjust the formula according to your needs, such as changing the order or the tie mode.

     

    Please refer to this for more information.

     

    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.