Forum Discussion
prashantg364
Helper II
3 years agoDAX
Below is my dataset
| Product | Category A | Category B | Category C | Category D | Category E | Category F | Category G | Category H |
| Java | Pass | Pass | Fail | Fail | Fail | Pass | Pass | Pass |
| Honda | Fail | Fail | Fail | Pass | Pass | Fail | Fail | Fail |
| Amaze | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass |
| Fiat | Fail | Fail | Fail | Fail | Fail | Fail | Fail | Fail |
| Duno | Pass | Pass | Pass | Pass | Pass | Fail | Fail | Fail |
| Sedan | Pass | Fail | Pass | Fail | Fail | Fail | Fail | Fail |
I want to add a column at the end to count the total number of pass
| Product | Category A | Category B | Category C | Category D | Category E | Category F | Category G | Category H | Count of Pass |
| Java | Pass | Pass | Fail | Fail | Fail | Pass | Pass | Pass | 5 |
| Honda | Fail | Fail | Fail | Pass | Pass | Fail | Fail | Fail | 2 |
| Amaze | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | 8 |
| Fiat | Fail | Fail | Fail | Fail | Fail | Fail | Fail | Fail | 0 |
| Duno | Pass | Pass | Pass | Pass | Pass | Fail | Fail | Fail | 5 |
| Sedan | Pass | Fail | Pass | Fail | Fail | Fail | Fail | Fail | 2 |
Hi prashantg364
Please refer to attached sample file with the proposed solution
Measure = IF ( ISINSCOPE ( 'Table'[Category] ), SELECTEDVALUE ( 'Table'[Status] ), COUNTROWS ( FILTER ( 'Table', 'Table'[Status] = "Pass" ) ) + 0 )
1 Reply
- tamerj1
Community Champion
Hi prashantg364
Please refer to attached sample file with the proposed solution
Measure = IF ( ISINSCOPE ( 'Table'[Category] ), SELECTEDVALUE ( 'Table'[Status] ), COUNTROWS ( FILTER ( 'Table', 'Table'[Status] = "Pass" ) ) + 0 )