Rolling Average Calculation

Hi All,

I’m new to Metabase and I’m trying to find a solution for calculating rolling averages. For Instance I have these 4 columns - Emp ID, Order ID, Revenue, Order Date. I need to calculate past 3 months (P3M) moving average of revenue for each employee id. The output will be:

Emp ID, P3M, Current Month Revenue

Please help!

Thanks and Regards,
Atul Singh

Hi @Atul1511
You are essentially asking for this feature:
https://github.com/metabase/metabase/issues/5817 - upvote by clicking :+1: on the first post
You would currently have to do such calculations in SQL manually. There’s most likely several examples for whichever database you are querying on stackoverflow.com