Newbies Trpan_z Posted August 17, 2017 Newbies Posted August 17, 2017 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
siroos12 Posted August 17, 2017 Posted August 17, 2017 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.
Newbies Trpan_z Posted August 17, 2017 Author Newbies Posted August 17, 2017 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
Lee Smith Posted August 17, 2017 Posted August 17, 2017 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.
comment Posted August 17, 2017 Posted August 17, 2017 (edited) 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 August 17, 2017 by comment 2
Newbies Trpan_z Posted August 19, 2017 Author Newbies Posted August 19, 2017 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 elect.fmp12
comment Posted August 19, 2017 Posted August 19, 2017 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.
Newbies Trpan_z Posted August 19, 2017 Author Newbies Posted August 19, 2017 (edited) 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 August 19, 2017 by Trpan_z
comment Posted August 19, 2017 Posted August 19, 2017 (edited) 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 August 19, 2017 by comment
Newbies Trpan_z Posted August 19, 2017 Author Newbies Posted August 19, 2017 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
comment Posted August 19, 2017 Posted August 19, 2017 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.
Recommended Posts
This topic is 2919 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 accountSign in
Already have an account? Sign in here.
Sign In Now