Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Newbies

I have difficulties to solve this in FileMaker 16 please see attached file

I cant find rank function...

step1 and 3 are easy but step 2 is a problem

Please help me I'm desperate. 

d'hondt.xlsx

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.

  • Author
  • 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

 

Please see this link

 

thanks

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.

 

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

  • Author
  • Newbies

I think that my approach for the solutions is wrong. Please see the fm file.

I need to rank all id's and enter unique value in rank fields 

I'm a beginner in FM :B

elect.fmp12

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.

  • Author
  • 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

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

  • Author
  • 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

Well, I only had a few minutes to look at it, but I believe this is basically how I would approach this:

 

D'Hondt.fmp12

 

This takes the data from the example in the Wikipedia article and, AFAICT, arrives at the same results.

 

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.