We're creating a chart that gets the count of users per day, and we want to include a column that calculates the rolling sum of the count of users in the last 7 days. This differs from a standard running total, because it only includes the sum of the previous 7 rows of data.
We'll start by building a chart for the count of users per day. So far, our chart looks like this:
Next, we'll add a new column in the Pipeline to calculate the moving average. Select +Add Step, choose Add Column, and select Moving average in the formula dropdown. Then, we'll select our Count of User Id column, and enter "7" in the Trailing Rows input.
The moving average is simply the sum of the last 7 values divided by 7. Therefore, we can get our rolling sum by multiplying the moving average by 7. We'll add a new column to do exactly that:
Finally, we'll add a Hide Columns step to hide our Moving average column, and choose a line chart for our chart type. Our final chart is below.