Jump to content

Find count of unique values of a particular field


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

Recommended Posts

I would like to be able to find a count of the unique values of a particular field in a found set, e.g. find how many different last names there are in a list of people.

I've dabled with calculations triggered by scripts, summary fields based on the field in question, but the only way I've gotten it to (sort of) work is to create a value list from the field, then do

ValueCount ( ValueListItems ( "DatabaseName" ; "FieldValueList" ) )

however this seems to work only for the entire database, not just the found set.

This topic and this one cover this a bit, but its not clear if they've gotten it to work, I don't completely understand their solution, and they seem to be doing something more complicated.

This seems like it should be a basic function for a report- to summarize unique values, and I can get a list, but I just want a simple count at the click of a button.

Link to comment
Share on other sites

See comment's description from the second thread:

http://fmforums.com/forum/showpost.php?post/197350/

Because it involves the getsummary() function, you do have to sort the found set to get the result.

Link to comment
Share on other sites

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