Is there any way I can do countifs() functions directly in AppSheet. I need to count something based off of 3 criteria. For example, I need a formula that examines the following sheet and gives me a running count based off of 3 columns.
a specific user (i.e. useremail())
a specific type of service (i.e. Type 1) 3. has a specific status (i.e. Pending).
Iโve tried using the count(select(in())) function in a virtual column, but I can only get it return a single column of data, or compare a single โvalueโ when counting. I canโt seem to nest it with โif()โ or โand()โ. Any ideas?
Thanks!
@Administrator1 Thereโs no COUNTIF in AppSheet, but you can use a COUNT(SELECT(โฆ)) formula. See this app for an example: appsheet.com - SUMIF and COUNTIF - This app shows how to do SUMIFs and COUNTIFs in AppSheet
More info here: https://help.appsheet.com/expressions/expression-types/list-expressions-and-aggregates SUMIF and COUNTIF - This app shows how to do SUMIFs and COUNTIFs in AppSheet appsheet.com
As a starting point, youโll want something like
COUNT(SELECT(YourTable[Key Column], AND([Column1] = โsome valueโ, [Column2] = "another value)))
I tried using the Count(Select()) method outlined in the example application, but it doesnโt work properly for my purpose (unless Iโm missing something). The Count(Select()) method only compares a single range and criteria, not multiple. For instance, I need a formula that does the following in Excel: COUNTIFS([Username],USEREMAIL(),[Service Type],โType 2โ,[Status],โPendingโ). COUNTIFS, unlike COUNTIF, allows you to use multiple criteria ranges and values to create a count.
Hereโs a link to the function: support.office.com - COUNTIFS function - Office Support
COUNTIFS function - Office Support support.office.com
Hi, did you get the solution to COUNTIFS()? Iโm having the same problem
Welcome to the AppSheet Community!
I believe that you can use a combination of IFS(), COUNT() and SELECT() functions like so:
IFS(
<criteria1>, COUNT(SELECT(...)),
<criteria2>, COUNT(SELECT(...)),
<criteria3>, COUNT(SELECT(...)),
<criteria4>, COUNT(SELECT(...)),
true, <default value or expression>
)
The criteria can be expressions returning Yes/No results like AND(), OR(), IN(), etc.
When using IFS(), I strongly recommend using a default value of some sort as shown. It can save you some troubleshooting grief later.
User | Count |
---|---|
16 | |
13 | |
8 | |
7 | |
4 |