Forum Discussion
dte-chris
6 years agoHelper I
COUNTROWS + FILTER and include zero values
I am trying to use a filtered row count, but it's not displaying rows resulting in zero rows counted. Here is my measure formula: device_threats = COUNTROWS(FILTER('ThreatOccurrencesInTimeframe'...
- 6 years ago
I've given up on trying to get a measure to work and decided to just count it with an M query.
lightsquared
4 years agoNew Member
I found this to work:
CCV Count =
IF (
CALCULATE( COUNT ( 'ALT Monthly Critical Control Data'[Overdue CCV] ), 'ALT Monthly Critical Control Data'[Asset Status] = "ACTIVE",'ALT Monthly Critical Control Data'[Overdue CCV] < 0,'ALT Monthly Critical Control Data'[RMM Status] = BLANK()) = BLANK(),
0,
CALCULATE( COUNT ( 'ALT Monthly Critical Control Data'[Overdue CCV] ), 'ALT Monthly Critical Control Data'[Asset Status] = "ACTIVE",'ALT Monthly Critical Control Data'[Overdue CCV] < 0,'ALT Monthly Critical Control Data'[RMM Status] = BLANK()))
It essentailly performs a count on filtered data and if the value is BLANK() then replace with a 0 else peform the count on filtered data normally.