Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
majid154a
Frequent Visitor

Rank based on 2 indicators

Dear Experts,

With the delivery data, I want to rank the drivers based on two indicators: the largest number of orders and the minimum possible average total order time from all orders. Note that the target order time is 36 minutes.

How can I rank the drivers to get the top 5 who perform well?

Attached is an example of the data.

Thank you.

DriverNumber of OrdersAverage total order time
113244
210642
311634
414643
511230
612331
710636
812339
911935
1012933
1114740
1211836
1313245
1412639
1511036
1612241
1711444
1814131
1911637
2012734
2112530
2214243
2312438
2410637
2510744
2610938
2713238
2814031
2913139
3011945
3113444
3210141
3310244
3411838
3512343
3614442
3713141
3814731
3913544
4012140
1 ACCEPTED SOLUTION
ThxAlot
Super User
Super User

Make it dynamic

ThxAlot_0-1720551840032.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

4 REPLIES 4
ThxAlot
Super User
Super User

Make it dynamic

ThxAlot_0-1720551840032.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



@ThxAlot Thank you alot. Thank you. Thank you.

In your solution, can you exlplain to me this code: 

Rnk = GENERATESERIES( 1, CALCULATE( COUNTROWS( DATA ), DATA[Average total order time] <= 36 ) )
 
Also, we have here top 13 in our example, how If need top 20 or top 30?

Thanks much for hepling> 

That create a result meeting the requirement of DATA[Average total order time] <= 36; otherwise, you can put an arbitary number as you like,

Rnk = GENERATESERIES( 1, 100 )


Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



majid154a
Frequent Visitor

@Anonymous 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.