Forum Discussion

Promethes_2's avatar
Promethes_2
Helper II
9 years ago
Solved

COUNTROWS over range question

Hello,   I'm struggling with creating a measure that does the following:        Sum the number of occurrences for each incident type for the previous week ending.   I have a table that has the ...
  • Promethes_2's avatar
    9 years ago

    I figured out the issue with my filter, which now works as expected:

     

    BEFORE:

    RequestTypeCount = CALCULATE(COUNTROWS('Report'),FILTER('Report', 'Report'[Created On] < MAX('Report'[WeekEnding]) && 'Report'[Created On] >= MAX('Report'[WeekEnding]) - 7))

     

    AFTER:

    RequestTypeCount = CALCULATE (COUNTROWS ( 'Report' ), FILTER ('Report','Report'[WeekEnding] < MAX ( 'Report'[WeekEnding]) && 'Report'[WeekEnding]>= ( MAX ( 'Report'[WeekEnding] ) - 7))

     

    And now I get this, the only remaining question I have is where is that extra 1 coming from, it's not in the data? 32 is the correct count but I'm not sure why 1 is in there?