Forum Discussion
kimstriebel
3 years agoRegular Visitor
Count if true in two columns
I am trying to figure out how to create a column that will count if two other columns have a value of true. For example:
| A | B | C |
| True | True | 1 |
| True | FALSE | 0 |
| FALSE | True | 0 |
| True | True | |
| FALSE | True | |
| FALSE | FALSE | |
| FALSE | True | |
| True | True |
I am trying to populate column C to count, either in true/false or a number, when both columns say true.
Any ideas?
Hey kimstriebel,
If column 'A' and 'B' have the data type 'boolean', you can use this formula:
C = INT ( AND ( 'Table'[A], 'Table'[B] ) )If they have data type 'text' then this:
C = INT ( AND ( CONTAINSSTRING ( 'Table'[A], "true" ), CONTAINSSTRING ( 'Table'[B ], "true" ) ) )
1 Reply
- Barthel
Solution Sage
Hey kimstriebel,
If column 'A' and 'B' have the data type 'boolean', you can use this formula:
C = INT ( AND ( 'Table'[A], 'Table'[B] ) )If they have data type 'text' then this:
C = INT ( AND ( CONTAINSSTRING ( 'Table'[A], "true" ), CONTAINSSTRING ( 'Table'[B ], "true" ) ) )