Forum Discussion
DavidB
9 years agoFrequent Visitor
Moving average measure with sum
Hello I am new to this forum and calculated formulas in general - so bear with me if the question is 'too easy' :) I have a simple data set like this example "FRUIT": DATE ITEM COUNT...
v-huizhn-msft
9 years agoMicrosoft Employee
Hi DavidB,
Based on your measure, you use DATESINPERIOD (FRUIT[DATE];LASTDATE (FRUIT[DATE]);-1;MONTH), which means it will calculate the the average during the past one month from your lastdate of FRUIT[DATE]. I am a little confusing about your calculation about specific, for example, you want to get (10+34+20)/3 for 2017-01-01, right? If it is, please use the formula to create a calculated column rather than measure.
Average=CALCULATE(AVERAGE(FRUIT[COUNT]), ALLEXCEPT(FRUIT,FRUIT[DATE]))
Best Regards,
Angelia