How to keep average line after filtering

You can do an avgOver and set the calculation level to be PRE_FILTER!

I’m using countOver for ease of displaying purposes but you would use avgOver

countOverFilter = countOver({session_id},[truncDate(‘DD’,{arrival_timestamp})],PRE_FILTER)

your calculation = avgOver({sales},[date],PRE_FILTER)

Here is the graph without filtering. As you can see the line matches the bars. This means that it is taking the countOver all of the client_ids in my example. Also notice the numbers are in the hundres.

Next I will filter to one client.

As you can see the bars have changed. On the left axis is the count for just that one client. However, on the right axis the numbers are the same as the previous graph and so is the line!

Something to note is that this will only display for dates that are part of that one client.

Let me know if that helps!

1 Like