Sean
Sean

Reputation: 69

Count Unique Values in Found Set

Firstly please allow me to explain what I am trying to achieve. I have a found set of about 100 records, each record has a SKU number (serial) now out of the 100 records, some records have the same SKU, so of course there is less than 100 unique SKUS.

I want to know how many times a SKU appears within the found set. NOT the total number of unique SKUS, but more like how many times each SKU appears individually.

So for example I could have the SKU - 123456 - which appears twice in the found set, so the value for that should be 2, as there are 2 instances of that SKU in the found set.

So just to reiterate, I do not want the total number of unique SKU's in the found set, but more to know how many times each individual SKU appears within the found set.

I have tried many things but keep ending up with the total unique values which is absolutely no use to me.

Thanks

Upvotes: 0

Views: 1479

Answers (2)

MDS
MDS

Reputation: 1

use ExecuteSQL filemaker native function to achieve this easily. here is FileMaker article that gives a very good insight:

http://help.filemaker.com/app/answers/detail/a_id/3423/~/counting-the-number-of-unique-values-in-a-field

Upvotes: 0

AndreasT
AndreasT

Reputation: 2337

Building on michael.hor257's idea, you can use the GetSummary function to achieve your desired result.


Sample field definition:

Sample field definition


After sorting your found set on SKU, this will produce the following result:

enter image description here

Upvotes: 1

Related Questions