Jump to content

Calculating percentages of pop-up value list


Crump

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

Recommended Posts

  • Newbies

My first Database with FM pro 5.5 I have a text field with a pop-up value list of types of deliveries (I'm an obstetrician) ie. normal deliveries, various forcep deliveries and various cesarean sections. I haven't assigned a field value to any of these types of deliveries but I did out of neccessity define a value list in order to make the pop-up. My problem is that I would like to extract the data as percentages of total deliveries, ie. percent forcep type, cesarean section, etc. Do I need to go back and make a portal to the field and loose all my entries or is there some way to get at this in perhaps a running tally. Keep in mind when and hopefully if you answer that I have little knowledge of what I'm doing. Everyone at work says drop filemaker pro and go to a PC and use Microsoft access. I prefer the Mac

Link to comment
Share on other sites

The first part of solving this problem needs some FM experience. The second needs some basic math, i.e. Excel. Without knowing the full structure of your file(s), however, I can only point you in the right direction.

Do you know what a self-relationship is? Because if you don’t want to use a second file, you will need one. If you create a self-relationship to create a portal, you will not lose anything. This would be one solution:

Firstly, you need to count the full total of deliveries – I trust you can do this?

Then -

Use your items field (pop-up menu) to create a relationship to itself. So for example, if the field is called <Item>, create a relationship using this field, lets call the relationship Rel_Item.

Now create a calculating field (not stored) called <count_items>, this will look like this:

Count(Rel_Item::A_Field)

A_Field is any field that always has a value other than 0

So now you know how many of any particular item have been taken.

Now create another calculating field (not stored), lets call it <Item_Percent> that simply divides <count_items> by the total number of deliveries, and set the field in your layout to percent.

I hope you can make sense of this, and that it helps.

Rigsby

Link to comment
Share on other sites

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