15a0 Posted November 6, 2008 Posted November 6, 2008 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
comment Posted November 6, 2008 Posted November 6, 2008 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.
bruceR Posted November 6, 2008 Posted November 6, 2008 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now