Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Measure = single value cannot be determined

I am trying to calculate a moving average with the following measure:   CL1_30DAY_MA = averagex(datesinperiod(Sheet1[Date],lastdate(Sheet1[Date]),-30,day),[CL1])   However, I am getting an error ...
  • v-cherch-msft's avatar
    7 years ago

    Hi Anonymous

     

    You may try below measure:

    CL1_30DAY_MA =
    CALCULATE (
        AVERAGE ( Table[CL1] ),
        DATESINPERIOD ( Sheet1[Date], LASTDATE ( Sheet1[Date] ), -30, DAY )
    )

    Regards,

    Cherie