I’m trying to display a Moving Avg metric as a line chart grouped by another dimension. I’ve added the Group By field as a partition field in the windowAvg calculation, but the resulting average for the time window doesn’t match up with the actual values. It seems that this may be bc the start index and end index are calculated before the group partition.
Is this the right root cause of my issue? If not, any ideas on how to accurately calculate a windowAvg for each group in a line chart?
If it is the right root cause, does anyone know what calculation level (PRE_AGG, PRE_FILTER, or POST_AGG_FILTER) the windowAvg function works at? And is there a way to indicate the calculation level for this function?
Here’s the current field calculation:
windowAvg({Field1},[{date} ASC],3,0,[group by Field 2])