Jump to content

Rank function


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

Recommended Posts

Are you sure that you uploaded the correct file to your post?

 

On the other hand, please edit your description and clearly explain your problem step by step. the current description is not clear.

 

Thanks.

Link to comment
Share on other sites

  • Newbies

yes i uploaded excel

i solve in excel because rank function is available there but cant find solution in filemaker. 

Its a d'hond method for calculating seats in parlament

 

Link to comment
Share on other sites

Hi Trpan_z and welcome to the FM Forums,

Sometimes you can find answers to questions online. I just did a Google Search for site: fmforums.com Rank function 

and it returned several hits.

@lola  good post.

 

Link to comment
Share on other sites

There is no Rank() function in Filemaker.

You can calculate rank on your own. The exact method depends on whether you want to calculate the rank based on the found set or the entire table, and a few other factors (e.g. ascending or descending).

The attached file shows how you can calculate rank based on the found set, descending. Note that duplicates are ranked the same, and the corresponding ranks are skipped. Records do not need to be sorted.
Requires version 16.

 

 

Rank_v16.fmp12

Edited by comment
  • Like 2
Link to comment
Share on other sites

12 minutes ago, Trpan_z said:

I think that my approach for the solutions is wrong.

I think so too. I don't know what your data represents, but I am quite sure you should have records in a related table instead of numbered fields. Fields cannot be sorted, records can.

Link to comment
Share on other sites

  • Newbies
9 minutes ago, comment said:

I think so too. I don't know what your data represents, but I am quite sure you should have records in a related table instead of numbered fields. Fields cannot be sorted, records can.

its a classic d'hondt model used in elections to calculate how many seats are won from parties.

Edited by Trpan_z
Link to comment
Share on other sites

13 minutes ago, Trpan_z said:

its a classic d'hondt model used in elections

It may be classic to you, but this is first time I've heard of it, at least by that name (spelling it correctly would also help :(). And glancing at the Wikipedia article, I see no mention of "rank" - so it's not clear to me what exactly you're talking about. Are you trying to calculate the number of seats based on the votes received? This may be possible in Filemaker, but I get the impression Excel would be a far better tool for this.

 

Edited by comment
Link to comment
Share on other sites

  • Newbies
16 minutes ago, comment said:

It may be classic to you, but this is first time I've heard of it, at least by that name (spelling it correctly would also help :(). And glancing at the Wikipedia article, I see no mention of "rank" - so it's not clear to me what exactly you're talking about. Are you trying to calculate the number of seats based on the votes received? This may be possible in Filemaker, but I get the impression Excel would be a far better tool for this.

 

i have solve that in excel it was easy, but i wanted to do in FM. 

https://en.wikipedia.org/wiki/D'Hondt_method

d'hondt.xlsx

Link to comment
Share on other sites

This topic is 2434 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.