Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

COUNTROWS over range question

$
0
0

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 following relevant fields (this is an abbreviated snap of my table):

 

Request Type

WeekEnding

Application

9/17/2016

Application

9/10/2016

Application

9/10/2016

Application

9/10/2016

Internal

9/10/2016

Internal

9/10/2016

New Development Request

9/3/2016

 

I am trying to return (for the snippet above, the actual data has more values matching the criteria):

 

Application = 4

Internal = 4

 

I created this measure:

 

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

 

But I am getting extra counts for things I am expecting to be filtered out (values in red I'm not sure why they are being counted):

 

2016-09-19 22_19_02-Microsoft Edge.png

 

The total count should be 32 (21 Application + 11 Internal), any thoughts on what I'm doing wrong?


Viewing all articles
Browse latest Browse all 213819

Trending Articles