02-06-2019 11:06 AM
I am working with a large, police-data set looking at searches. The data set spans over 5 years, and there are duplicate items (example: if two subjects were apart of one search, they will have the same item number). I am able to create a measure that counts those individual items, but what I am trying to do is create a line and stacked column chart with the column showing the week-to-date total of searches, and the line showing the average from the weeks from the previous years (example: it is week 6 of 2019, so the column may show 40 searches that have happened thus far, and the line will show the running average of week 6 according to the data from 2014-2018). I cannot use the individual count measure that I made in this DAX expression.
AvgPerWeek = CALCULATE(AVERAGE('Stop and Search'[Week Mon-Sun]),FILTER(ALL('Stop and Search'), 'Stop and Search'[item number this is where I would have liked to use the measure for individual count] =MAX('Stop and Search'[item number this is where I would have liked to use the measure for individual count])))
Any help you could give would be awesome.