Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
9917mark
Contributor III
Contributor III

Find the rank of multiple ranked fields

Morning to all,

Could I please get some help with the following.

I have 4 unique ranking calculation which give me the respective rank based on

  • Qty of Tansactions (Rank Trans)
    • only(aggr(nodistinct rank(count(Partno),4,1), Partno))
  • Qty Sold (Rank Qty)
    • only(aggr(nodistinct rank(sum(OrderQty),4,1), Partno))

  • Sales Value (Rank SalVal)
    • only(aggr(nodistinct rank(sum(TotalSales),4,1), Partno))

  • GP Rands (Rank GPR)
    • only(aggr(nodistinct rank(sum(RProfit),4,1), Partno))

Capture.PNG

All of which are working perfectly.

What I require is to get an overall ranking based on all of the previous rankings. (Rank Over)

Where currently I can only get the combined sum of the rank.

ie in the Rank Over the results should display :

Capture1.PNG

Your help will be appreciated.

1 Solution

Accepted Solutions
sunny_talwar

Try this

Rank(Total(-RangeSum(

only(aggr(nodistinct rank(count(Partno),4,1), Partno)),

only(aggr(nodistinct rank(sum(OrderQty),4,1), Partno)),

only(aggr(nodistinct rank(sum(TotalSales),4,1), Partno)),

only(aggr(nodistinct rank(sum(RProfit),4,1), Partno)))),4,1)

View solution in original post

7 Replies
sunny_talwar

Have you already tried this?

Rank(Expression1, Expression2, Expression3, Expression4)

9917mark
Contributor III
Contributor III
Author

I have thanks, as well as adding the four ranks together and then doing an overall ranking on that result.

sunny_talwar

Sorry, that is what I meant

Rank(RangeSum(

only(aggr(nodistinct rank(count(Partno),4,1), Partno)),

only(aggr(nodistinct rank(sum(OrderQty),4,1), Partno)),
only(aggr(nodistinct rank(sum(TotalSales),4,1), Partno)),

only(aggr(nodistinct rank(sum(RProfit),4,1), Partno))))

What do you do when you add this as one of your expression

9917mark
Contributor III
Contributor III
Author

Ok no laughing now,

I modified your suggestion to get the ranking to work. (Rank Over)

Rank(Total(RangeSum(

only(aggr(nodistinct rank(count(Partno),4,1), Partno)),

only(aggr(nodistinct rank(sum(OrderQty),4,1), Partno)),

only(aggr(nodistinct rank(sum(TotalSales),4,1), Partno)),

only(aggr(nodistinct rank(sum(RProfit),4,1), Partno)))),4,1)


And it works perfectly except for one small problem.

It is ranking in the reverse order ????

Capture3.PNG

When I use the example you have posted I get (Sunny)

Capture4.PNG

@

Re: Find the rank of multiple ranked fields

Sunny Talwar

Thanks for the patience

sunny_talwar

Try this

Rank(Total(-RangeSum(

only(aggr(nodistinct rank(count(Partno),4,1), Partno)),

only(aggr(nodistinct rank(sum(OrderQty),4,1), Partno)),

only(aggr(nodistinct rank(sum(TotalSales),4,1), Partno)),

only(aggr(nodistinct rank(sum(RProfit),4,1), Partno)))),4,1)

sunny_talwar

Ok no laughing now,

Why not? Laughing is a good thing

9917mark
Contributor III
Contributor III
Author

You are a star

Re: Find the rank of multiple ranked fields

Sunny TalwarLegend

Appreciate all the help with this.