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

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

Recommended Posts

Posted

I want to create a function that works like "Countif" in Excel. For example, to count only the text value "7" in a series of cells in Excel I use:

=COUNTIF(A2:Z2,7)

which ignores any other text value and counts the occurrences of the value "7". In FMP how do I get the same result?

Posted

Filemaker doesn't have a built-in CountIf function. You could write a custom function using the Advanced version, but Filemaker's "native" way to deal with aggregating data is to use relationships or produce a sub-summarized report.

Posted

I want to create a function that works like "Countif" in Excel. For example, to count only the text value "7" in a series of cells in Excel I use:

=COUNTIF(A2:Z2,7)

which ignores any other text value and counts the occurrences of the value "7". In FMP how do I get the same result?

ValueCount( FilterValues( List( relation::Field); "7"))

  • 10 months later...
Posted

ValueCount( FilterValues( List( relation::Field); "7")) works great for static values (eg. words and strings).

I want to count values greather than "7". I tried something like this

ValueCount( FilterValues( List( relation::Field); "relation::Field > 7")) However, it returns me "0"

  • 8 years later...
  • Newbies
Posted (edited)

Thank you ALL contributors to this feed! This problem has quite simply been doing my head in for a few hours. 

I used the following:

ValueCount( FilterValues( List( RELATED TABLE I WANTED TO SEARCH::THE FIELD I WANTED TO COUNT THE NUMBER OF REPETITIONS ); THE MATCHED FIELD))

Example below:

ValueCount( FilterValues( List( Car Inventory::Car Type); "Landrover"))

Result:

The number of records that match the car type 'Landrover' within the table inventory

Edited by bmftn

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