Skip 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.

Count Unique Field Values

Featured Replies

I am new to FM8. This may be a simple solution...

I have a Table that contains the answers to 50 test questions, in seperate fields, with 8 possible answers(A,B,C,D,1,2,3,4).

I would like to have the item analysis for each question diplayed in one report, for example 5-A's, 6-B's, 13-C's.

In addition... I would like to perform calculations on the results, for example what percentage of the respondants selected "A" for an answer.

I have orderd FMP 8 Advanced.. if that helps at all.

Thank you in advance.

There a many ways to do this. Personally I would have made each question a related record in another table. Every time someone clicked on a New test button I would create 50 new blank records with 10 fields: the test ID, the question number, & 8 answer fields--one for each possible answer. Each answer field would be a check box with 1 as the value list. Then you could get sum() or summary by question number and/or answer field.

If we do it the way you are doing it. You could:

Create 8 different calcs, one for each answer. These calcs will figure out how many A's, B's, etc. are on one record (test? questionnaire?).

Calc A

case(answer1= "A"; 1) +

case(answer2= "A"; 1) +

case(answer3= "A"; 1) +

case(answer4= "A"; 1) +

case(answer5= "A"; 1) +

...etc

case(answer50= "A"; 1)

Calc B

case(answer1= "B"; 1) +

case(answer2= "B"; 1) +

case(answer3= "B"; 1) +

case(answer4= "B"; 1) +

case(answer5= "B"; 1) +

...etc

case(answer50= "B"; 1)

Then for summary analysis by question you get into some problems:

You will need 400 calcs not counting the summary calcs: 1 per answer per question in order to parse out each answer so it can be counted individually.

answer_1_A = case(answer1="A", 1)

answer_2_B = case(answer1="B", 1)

answer_2_C = case(answer1="C", 1)

ect...

Then you can summarize each answer for each question individually.

If I were you and I had already collected the data in that format I would write a script to split out the data like I mentioned at the beginning.

Sometimes I miss the obvious so there might be an easier way. Anyone else?

  • Author

Thank you for the help. Your initial suggestion would work great, but I am importing all of the data from an Excell document. I have 2000 students each with 5 years worth of testing data that takes 400 fields for each year. I have all of the other "issues" addressed. I am hoping there is a solution that does not require 16 fields for each question. (There are multiple tests with 50 questions each).

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.