Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Unique values - is there a more direct way?


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

Recommended Posts

With much credit and due thanks to this (and other forums) I was recently able to come up with a solution to get the count of unique values in a field on a report.

I'm really surprised a program that's been around so long doesn't have a more direct way of accomplishing this. Not a knock - I'm new to FMP and generally like it's ease of use. Which is again why I am surprised this is so complicated.

Anyhow, here is how I got my count of unique values:

(1) Create a calculated field:

1 / GetSummary(CountOfItem, Item)

(2) Create a summary field which totals the above calculated field

I'm not entirely sure how this works - really step one is the confusing part.

So, any insight into that would be a appreciated, as would any additional discussion about an easier approach to getting a count of unique values.

thanks,

Jeff Henke

Link to comment
Share on other sites

That is still the best method, IMHO, when working with a found set. BTW, your description is missing a step - see, for example:

http://fmforums.com/forum/showtopic.php?tid/196904/post/297916/#297916

I'm not entirely sure how this works

Scroll down the same thread.

Link to comment
Share on other sites

There are a lot of ways to do this, including some methods using custom functions such as http://www.briandunning.com/cf/890 or search the Brian Dunning list for unique.

You can also do it with applescript:

set AppleScript's text item delimiters to "n"

get data field "myField" -- use your field name

set theResult to result as text

do shell script "echo -e " & quoted form of theResult & " |sort|uniq"

copy result to cell "ShowResult" of current record

Link to comment
Share on other sites

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