# Rank X - League Table

Hi Dna Team,

I’m building a League Table as described Below.

Contractor Projects Available Won Lost W/L Ratio Rank Cost Rank Time Rank Total
Contractor A 105 26 79 25% 4 3 x
Contractor B 105 22 83 21% 2 10 x
Contractor C 105 16 89 15% 7 1 x
Contractor D 105 14 91 13% 5 9 x
Contractor E 105 8 97 8% 10 6 x
Contractor F 105 7 98 7% 9 7 x
Contractor G 105 5 100 5% 1 8 x
Contractor H 105 5 100 5% 3 2 x
Contractor I 105 2 103 2% 8 4 x

So far a successfully Ranked Both Rank Cost and Rank Time using a Rankx Function.

Rank MC Cost = RANKX( ALL(‘Contractor Cost Predictability’[Contractor]), [Total CP],ASC)

Rank MC Time = RANKX(ALL(‘Contractor Cost Predictability’[Contractor]), [Total TP],ASC)

However, I need some help to expand my Total Rank Measure to take in account for the Contractors Win/ loss Ratio. Ultimately my goals in to rank all the contractors fairly based on win/loss, Cost and Time.

You’re off to a terrific start here. Just three more steps needed:

1. create a “RankX Win Loss” measured using the same approach you’ve already used for cost and time , except this time you will use “DESC” as the fourth parameter, since higher win loss percentage is associated with better rank.

2. create a composite score measure. If cost, time and win loss percentage are all of equal weight in your evaluation framework, the measure will just be [Rank Cost] + [Rank Time] + [Rank WL%]. If some criteria get higher weight than others, you can just set those weights in variables within the measure and return Composite total of
weight1*[Rank Cost] + weight2*[Rank Time] + weight3*[Rank WL%]

3. create a final RANKX measure of the composite score created in 2) above, using “ASC” as your sort order parameter (lower composite score equals better ranking)

I hope this is helpful. If you need a more specific DAX solution, please just provide a PBIX file with some nonconfidential sample data and I’ll be happy to craft that.

• Brian
3 Likes