Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

MAA not summing correctly

Hi all,

 

I'm trying to make a moving annual average (over 13 periods) of incidents, however my MAA keeps under reporting. Here is my MAA measure:

 

MAA Incident Count = 
IF([Count_periods_present] = 13,
    CALCULATE (DISTINCTCOUNT('AttributionEvents_v1 1 0_Eastern'[Incident Number]),
        FILTER(
            ALL('Financial Year & Period Data'),
            'Financial Year & Period Data'[Index] >= MAX('Financial Year & Period Data'[Index]) -12
            && 'Financial Year & Period Data'[Index] <= MAX('Financial Year & Period Data'[Index])
    ))/13)

 

 

It is important that the measure only counts the distinct incident numbers within each period, as there are many duplicate incident numbers (the incidents can contain several "events"). 

The table below shows an incorrect total, and this is the value (677) that the MAA is using rather than the actual total of 909:

How do I get my MAA to correctly sum the period incident counts to 909?

 

Thanks,

Tom

3 Replies

  • Anonymous , Try measure like

     

    MAA Incident Count =
    Sumx(Values('Financial Year & Period Data'[Financial Year/Period]) , IF([Count_periods_present] = 13,
    CALCULATE (DISTINCTCOUNT('AttributionEvents_v1 1 0_Eastern'[Incident Number]),
    FILTER(
    ALL('Financial Year & Period Data'),
    'Financial Year & Period Data'[Index] >= MAX('Financial Year & Period Data'[Index]) -12
    && 'Financial Year & Period Data'[Index] <= MAX('Financial Year & Period Data'[Index])
    ))/13))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi amitchandak, unfortunately that still returns the same values as before, 52.08 for the first 13 periods.