Forum Discussion
COUNTROWS over range question
- 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?
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?
- v-qiuyu-msft9 years agoCommunity Support
Hi Promethes_2,
I guess there are some records of "Request Type" in the table are empty values. You can uncheck the option "Show items with no data" for the column "Request Type".
Bets Regards,
Qiuyun Yu- Promethes_29 years agoHelper II
You are correct about there being an empty row. I guess I was thrown off by the fact that is shows the empty row with a value of 1 but it does not reflect in the total (21 + 11 + 1 = 33 not 32 as PBI is showing in the screenshot).