# Calculations using value lists

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

## Recommended Posts

• Newbies

I'm newish to FM7 and I need to create some calculation or summary fields (not sure which) for a report I need to build.

I have a field in my set of 1000 or so records that is a drop-down box with the defined values "yes" and "no".

I want to be able to count how many of the 1000 records show "yes" and how many records show "no"?

I appreciate anything you could offer. I work with secondary school kids and this would really help me in the right direction.... Also, can you point me at any other good references for learning about FM summary and calculation functions?

##### Share on other sites

Hi, Hexed!

Create calc field=Case(Your_Field="Yes",1,0)

Then create summary field based on this. it show how many "yes" you have in found set.

You can do it by selfrelation two.

Edited by Guest
##### Share on other sites

• Newbies

Thanks for that, the first calculation seams to work fine, but could you be more specific about the summary field?

Thanks again....

##### Share on other sites

• Newbies

Fantastic! Thanks....I'll try and get my head around it. I appreciate your help!

Cheers,

##### Share on other sites

The proper way to count records is using a subsummary report. While the calculation method may work fine in this situation, imagine trying to count a field that has many more choices than Yes and No. If you were trying to count the product you sold at the .99 cent store, you would need thousands of calculations and summary fields. And, each time you got a new proudtc in stock, you would need to add a new calculation and summary field. I would highly recommend looking into subsummary parts combined with summary fields for the most efficient reporting mechanism.

##### Share on other sites

• Newbies

Hi John,

Many thanks for your advice. I see exactly where you're coming from. I have quite a large report to build and I can see how the number of fields could build up rapidly.

Could you point me in the direction of some good resources to learn about the subsummary functions? I really need to get up to speed on all this stuff as it's the reports that will drive my overal work.

##### Share on other sites

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

## Create an account

Register a new account