Forum Discussion
Anonymous
4 years agoNot applicable
COUNTROWS Function to exclude repeated value
hello Experts. I want to count the number of "Completed" Projects where the function will check if there is any repeat in Column "ID" and if there is any repeat then it will check if both "Status" f...
- 4 years ago
Hi,
Measure for 'Completed':
Completed := VAR MyTable = SUMMARIZE( 'Table', [ID], "ID Count", COUNTROWS( 'Table' ), "Completed Count", CALCULATE( COUNTROWS( 'Table' ), 'Table'[Overall ACL Status] = "Completed" ) ) VAR CompletedCheck = SUMX( MyTable, 0 + ( [ID Count] = [Completed Count] ) ) RETURN CompletedCheckRegards
- 4 years ago
Try:
Pending := VAR MyTable = CALCULATETABLE( VALUES( 'Table'[ID] ), 'Table'[Status] = "Pending" ) RETURN COUNTROWS( MyTable )Regards
Anonymous
4 years agoNot applicable
Hello Jos_Woolley
Sorry for my Friday's brain; please see below; I hope it makes sense now.
What changes do I have to bring in the DAX formula if I want to get the number of "Pending" status if any of the "ID" has "Pending" in it?
In this case(*message reference #1), the total "ID" number of "Pending" status will be 6 ( everything except 87031)
Thanks
Jos_Woolley
Solution Sage
4 years agoTry:
Pending :=
VAR MyTable =
CALCULATETABLE( VALUES( 'Table'[ID] ), 'Table'[Status] = "Pending" )
RETURN
COUNTROWS( MyTable )Regards