Forum Discussion
jay13
1 year agoRegular Visitor
Countrows with filters
I am trying to count the rows for an ID where they only have a specific code. Example: If I am looking to count the IDs that only have code D how would I count just that row. In this case the cou...
- 1 year ago
Simple enough,
SachinNandanwar
1 year agoImpactful Individual
Just incase if you want to return ID's that only have one instance of "D"
Table_1 =
VAR _Table =
SUMMARIZE(
'Table',
'Table'[ID],
"Codes", DISTINCTCOUNT( ( 'Table'[code] )),
"Codes_D",COUNTROWS( FILTER( 'Table', 'Table'[code] = "D" ))
)
RETURN FILTER(_Table,[Codes]=[Codes_D])