Jump to content

This topic is 7919 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am a beginner and have a simple application that has ten catagories that need to be ranked. How would I go about ranking these catagories from 1 to 10.

Posted

Hi,

Not sure I fully understand but maybe this will help...

Have your catagory field

Then the ranking field as a calculation...

Ranking =

Case( CatagoryField = Catagory1, "1", CatagoryField = Catagory2, "2", CatagoryField = Catagory3, "3", and so on...)

Ed.

Posted

I probably didn't explain this very good. I have 10 catagories that people put ratings in. Then I have a summary of each of the 10 catagories, I want to then rank these catagories from 1 to 10 so I know which one is most important. The other small problem is that some could have the same rating and I would still like those to be ranked maybe with equal rating and maybe not, I am not sure.

Here is an example of the 10 catagories

Tot Rank or Rank

CatA 7.8 4 5

CatB 8.3 1 1

CatC 7.7 5 7

catD 6.8 7 9

CatE 7.9 3 4

CatF 8.1 2 2

CatG 8.1 2 3

CatH 7.7 5 6

CatI 5.5 8 10

CatJ 6.9 6 8

So that the results could be calculated to rank the results of the catagories in either of the two ways

Posted

I probably didn't explain this very good. I have 10 catagories that people put ratings in. Then I have a summary of each of the 10 catagories, I want to then rank these catagories from 1 to 10 so I know which one is most important. The other small problem is that some could have the same rating and I would still like those to be ranked maybe with equal rating and maybe not, I am not sure.

Here is an example of the 10 catagories

Tot Rank or Rank

CatA 7.8 4 5

CatB 8.3 1 1

CatC 7.7 5 7

catD 6.8 7 9

CatE 7.9 3 4

CatF 8.1 2 2

CatG 8.1 2 3

CatH 7.7 5 6

CatI 5.5 8 10

CatJ 6.9 6 8

So that the results could be calculated to rank the results of the catagories in either of the two ways

Posted

OK,

Have a global field g_Rank

Do a sort descending on the summary field

then run this script

Set Field[g_Rank, "1"]

Go to Record[First]

Set Field[Rank, g_Rank]

Set Field[g_Rang, g_Rank + 1]

Loop

Go to Record[Next, exit after last]

Set Field[Rank, g_Rank]

Set Field[g_Rang, g_Rank + 1]

End Loop

I have not tested this so may need tweaking slightly.

This will set identical summaried to different ranks though in your example CatF would be 2, CatG would be 3.

Ed.

This topic is 7919 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.