I am trying to count the number of columns in a row that are true. For example:
| INDEX | COL 1 | COL 2 | COL 3 | # TRUE |
|---|---|---|---|---|
| 1 | true | false | true | 2 |
| 2 | false | false | false | 0 |
| 3 | true | true | true | 3 |
I know I could solve this using a case statement with a pascal's triangle number of conditions, but is there an easier or more scalable way to do this?
