October 19, 200817 yr 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?
October 19, 200817 yr 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.
October 20, 200817 yr 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"))
November 2, 200817 yr Author I have now used it several times. Awesome! Here is the syntax where is the field: ValueCount(FilterValues((Grade);"7"))
November 2, 200817 yr It is an elegant solution for the given example - but it's not a true CountIf(). It only works when the test is for equality (CountSimilar?).
September 23, 200916 yr 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"
July 24, 20187 yr Newbies 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 July 24, 20187 yr by bmftn
Create an account or sign in to comment