AnsweredAssumed Answered

Countifs Custom Function

Question asked by pmccudden on Dec 5, 2017
Latest reply on Dec 5, 2017 by Vaughan

Hello Everyone,

 

Searching around of the internet, it is pretty easy to find a good countif custom function. I use the following in a lot of my calculations:

 

Countif ( Field ; Value )

The calculation is the following:

ValueCount ( FilterValues ( List ( Field ) ; Value ) )

 

However, I now need to count values based on multiple criteria. I'm looking for syntax that would look something like this:

 

Countifs ( Count Field ; Field 1 ; Value 1 { ; Field 2 ; Value 2 ... } )

 

Specifically, I'm creating a solution that keeps track of people on flights. It has 4 fields:

__UUID

_fk_flightUUID

_fk_passengerUUID

onFlight (validated to be either "yes" or "no")

 

I have a field on another table that I would like to count how many passengers are on a specific flight. So it would have to count all records that have a specific _fk_flightUUID and onFlight is "yes". Does anyone have a good way to go about this? Ideally a way that is easily transferable to other similar situations?

 

Thank you for your help!

Outcomes