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

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

Recommended Posts

Posted

(I know this has been covered multiple times here but after after performing multiple searches I can't find the answer, so my apologies for subject repetition.)

Happy holiday season, all.

This is pretty basic but I'm blowing it calculation-wise: I have a report that has two, summarized sections, the first by Test Code (TestCode__lxn, a number field) and the second by name (Name_LF__lct, a calculated concatenation of the Name_First__lxt and Name_Last__lxt text fields.)

What I want is a (distinct) count of students per test code (FieldName: Count) in the summarized Test Code section.

I first tried Name_LF__lxs--a summary field set to count Name_LF__lct--but with it parked in the Test Code summary section I get a count, but not a distinct one, i.e., it shows 40 instead of 37 because it's counting multiple, same-named Name__LF__lct records (3 of them).

Next, I tried GetSummary ( Name_LF__lxs ; Name_LF__lct ), but it shows only a count of 1.

...then I tried making a value list out of Name_LF__lct and used the calculation, ValueCount ( UniqueValues ( Name_LF__lct ) ) ...with indexing turned on since it's a calculated field. No good--still shows a count of 1.

I'm sure I could whip up an E-SQL calc but I'd prefer to keep to native FMP commands. I'm sure the answer's simple...too simple for this overcomplicated brain to handle. TIA for your help!

Posted

Actually, it's not that simple - and it used to be even more complicated

Start by defining a summary field as List of Name_LF__lct. Then add a calculation field (result is Number) =

ValueCount ( UniqueValues ( GetSummary ( sListOfNames ; TestCode__lxn ) ) )

where sListOfNames is the new summary field.

Add the calculation field to the sub-summary by TestCode__lxn part.

Posted

Rats, still getting a "1" for a count. I included a screenshot for your review of Count__lcn and Name_LF__lxs.

Here's the calc, as entered, in the Count__lcn field: 

ValueCount ( UniqueValues ( GetSummary ( Name_LF__lxs ; TestCode__lxn ) ) )

 

 

Screen Shot 2018-12-03 at 10.44.37 AM.png

Screen Shot 2018-12-03 at 10.48.35 AM.png

Posted

*blush* I had already defined the new Summary field but forgot to connect to it. Works like a charm--MANY thanks!

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