Jump to content
Server Maintenance This Week. ×

Calculating Wins and Loses


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

Recommended Posts

  • Newbies

Hi there,

 

I am extremely new to filemaker but trying to learn on my own.

 

I am creating a betting pool with my friends for this upcoming football season.  I want to calcuate how many picks a person got right based on calculating their weekly record and then calculating their overall record.  I know this is simple but I can't seem to figure it out.

 

The fields I want to evaluate in my layout "week 1" are:

Winner - Team that covered the spread

Scott - What team I picked that week

 

The first thing I did was create a calculation field(Scott Weekly TrueorFals) with  If(Week 1::Winner = Week 1::Scott; 1; 0).  This told me if I picked the correct team I got a 1 and if I did not I got a 0.

 

Then from there I want to calculate how many 1's (wins) and then how many 0's(loses) there are for the week.  This is the part im stuck on.

 

Can someone please help me?

 

Thank you in advance.

 

 

Link to comment
Share on other sites

You're on the right track, but missing one part..are you only doing one game per week or multiple games per week?(or something like that?)

Anyway, you want to look at Summary fields or the calculation called Sum.

If you clue us into your database structure(tables/links) with a little more detail we could better advise on which function to use to calculate your wins.

You're on the right track, but missing one part..are you only doing one game per week or multiple games per week?(or something like that?)

Anyway, you want to look at Summary fields or the calculation called Sum.

If you clue us into your database structure(tables/links) with a little more detail we could better advise on which function to use to calculate your wins.

Link to comment
Share on other sites

  • Newbies

I've attached a picture of the fields I am using and hope that helps.  Five of my friends and I will be picking all 15 games a week. Whoever picked the most right games for that week is the winner.  The "Scott Weekly Wins" is the field I want to calculate how many win's(1's) I got for that week in the "Scott Weekly TrueofFals" Field.  I hope I am making sense.

 

Thank you for your reply

post-111822-0-40490800-1409074998_thumb.

Link to comment
Share on other sites

I want to calculate how many win's(1's) I got for that week in the "Scott Weekly TrueofFals" Field.

 

You can define a summary field as Total of [scott Weekly TrueofFals]. This will show the sum of the values in the field for the current found set - so to get the number of "how many win's(1's) I got for that week", you will need to find the games for that week first (assuming you keep a history of all games).

 

This is of course a totally wrong structure to have, and if this were anything more serious than a friendly betting pool, I would encourage you strongly to ditch it and start from scratch with a proper relational structure.

Link to comment
Share on other sites

I am creating a betting pool with my friends for this upcoming football season.

 

First look at your screenshot made me think it came from an Excel spreadsheet …

 

The way you've set this up, you may as well use Excel; if you want to do it more convenient and in the FileMaker way, you'd need something like this:

 

post-80889-0-73386600-1409146078_thumb.p

 

Which is the product of tables that store Seasons, Teams, Matchdays, Matches, Betters (People) and Bets, plus some join tables, and the scripts to automatically generate slots for matches and bets. (For 15 games per week, one should probably ditch the filtered portal method for the bets display and use … well, something else  :twitch: )

 

This was originally done for a soccer league table, and adapted for the screenshot with some NFL team names. I'd have no problem giving you the template, but the file was built with FM13, and I really don't want to re-build it in FM11.  :cry:

Link to comment
Share on other sites

tables that store Seasons, Teams, Matchdays, Matches, Betters (People) and Bets, plus some join tables

 

Let's not get carried away: Games, Members and Bets should be quite adequate for starters. Teams would make a nice addition. Can't  see the need for Matchdays, dubious about Seasons.

Link to comment
Share on other sites

My guess it's part of the "Tables are cheap" "Fields are expensive" mantra. I've found myself using more tables to keep the field list thin in each table ( obviously only as necessary and practical for the solution ).

 

I have also been warehousing data as a summarized count/total in its own separate table. And just updating it as transactions happen. From a performance stand point, it's often performed better over a WAN that way. I so rarely use Summary fields. And even calculation fields much less than I used to. With that the Season and/or Matchdays table comes in handy. Though I am not sure I would use both.

 

If you are only doing a local file to track and it's not going to be deployed over a WAN, I suppose it's a matter of preference for a personal project like this.

 

Let's not get carried away: Games, Members and Bets should be quite adequate for starters. Teams would make a nice addition. Can't  see the need for Matchdays, dubious about Seasons.

Link to comment
Share on other sites

My guess it's part of the "Tables are cheap" "Fields are expensive" mantra.

 

I am afraid I don't understand the context of this bartering. The Matchdays table seems redundant to me since I cannot see what information it can hold other than a bunch of dates. The same date, presumably, is used as the matchfield between Games and Matchdays - so no fields are eliminated (if that matters).

Link to comment
Share on other sites

  • Newbies

First look at your screenshot made me think it came from an Excel spreadsheet …

 

The way you've set this up, you may as well use Excel; if you want to do it more convenient and in the FileMaker way, you'd need something like this:

 

attachicon.gifNFL_BettingPool_FM13_eos.png

 

Which is the product of tables that store Seasons, Teams, Matchdays, Matches, Betters (People) and Bets, plus some join tables, and the scripts to automatically generate slots for matches and bets. (For 15 games per week, one should probably ditch the filtered portal method for the bets display and use … well, something else  :twitch: )

 

This was originally done for a soccer league table, and adapted for the screenshot with some NFL team names. I'd have no problem giving you the template, but the file was built with FM13, and I really don't want to re-build it in FM11.  :cry:

Ya, I have set it up in excel because thats all I really know how to do when it comes to organzing the data.  I would love to be able to enter it into filemaker but I've never worked directly with filemaker before.

 

I really like the way you have this set up.  I have Filemaker 12 at home.  Would your template work on that?

Link to comment
Share on other sites

hmmmm...I read Matchdays as the summary of a series of games...  A week in football, for instance. Not all games are played on the same day. Maybe rolling the week's data up into a single record in the Matchday. I don't know soccer well enough to know what benefit it would have in that schedule.

 

I am afraid I don't understand the context of this bartering. The Matchdays table seems redundant to me since I cannot see what information it can hold other than a bunch of dates. The same date, presumably, is used as the matchfield between Games and Matchdays - so no fields are eliminated (if that matters).

Link to comment
Share on other sites

I have Filemaker 12 at home.  Would your template work on that?

 

Yes, after I converted the few FM13-only features to FM12, and have some other things shuffled around. Let me do that, then I'll post the file.

Link to comment
Share on other sites

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