Count the instances of "Yes" (in a row) across 5 specific columns

Evening,

Please could someone show me where I’m going wrong with this?

I’m trying to count the instances of “Yes” (in a row) across 5 specific columns.

I have the following in VC but I’m not getting the right result.

COUNT(SELECT(survey[branch_A_decision], [THISROW].[branch_A_decision] = “Yes”))+> COUNT(SELECT(survey[branch_B_decision],[_THISROW].[branch_B_decision] = “Yes”))+> COUNT(SELECT(survey[branch_C_decision],[_THISROW].[branch_C_decision] = “Yes”))+> COUNT(SELECT(survey[branch_D_decision],[_THISROW].[branch_D_decision] = “Yes”))+> COUNT(SELECT(survey[branch_E_decision],[_THISROW].[branch_E_decision] = “Yes”))

I had a look at the posts below but couldn’t convert them.

FAQ: FILTER(), LOOKUP(), MAXROW(), MINROW(), REF_ROWS(), and SELECT()

How do I do COUNTIF() or COUNTIFS()?> > COUNTIF(col, expr) , where col is a whole-column reference (e.g., A ), is similar to:> > auto> COUNT(> FILTER(> "table",> ([col] expr)> )> )> >

[Count occurrences in a table (CountIf) across rows & columns](https://community.appsheet.com/t/count-occurrences-in-a-table-countif-across-rows-columns/20389) Questions

Hi there! Newbie to AppSheet and struggling with a basic CountIf. I have a table with multiple rows & columns that have the same drop-down options. I’d like to tally the occurrence of each selected across the table. So let’s say I have Table 1 with multiple columns that have a drop-down with the options Red, Blue, Green, I’d like a formula in Table 2 to count the number of cells where “Red” is selected in all of Table 1. I’m sure it’s simple, but struggling to find how in support docs. Thanks! …

[Hello. Is there an expression for COUNT IF in...](https://community.appsheet.com/t/hello-is-there-an-expression-for-count-if-in/6128) Questions

Hello. Is there an expression for COUNT IF in Appsheet?

Thanks in advance…

Try:

(
  IFS(([branch_A_decision] = "Yes"), 1),
  + IFS(([branch_B_decision] = "Yes"), 1),
  + IFS(([branch_C_decision] = "Yes"), 1),
  + IFS(([branch_D_decision] = "Yes"), 1),
  + IFS(([branch_E_decision] = "Yes"), 1)
)

6 Likes

Hi @Steve,

That works! Thank you very much!

1 Like

I love IFS()… … it makes formulas so clean.

3 Likes