Rolling averages in widgets

Hi all, 

I need help with a couple of widgets, that to be honest, I'm not even sure where to start - I'm struggling with which dates to use where, but everything should be based around performance date as opposed to order or attended dates.....I'm trying to recreate some graphs that have been created by our research team in excel & I'd like to take the manual work from them if possible by adding it to our exhibitions dashboard. The graphs currently look like the 2 below - but I'm open to anything that will give them the same data. 

  1. Average daily ticket sales per week - as the image shows, the daily average number of tickets for each day of the week during a specific time period of 4 weeks (or 28 days).

        2. Rolling four week average ticket sales by day of the week 

thanks for any advice!

jo

Parents
  • Hi Jo,

    The first one is easy enough with bucketing formulas. With the ORDER DATE > Day of Week Sort on Categories of a Column chart, add a Value for each 4-week period, where the Total Ticket Count is filtered by ORDER DATE > Date being in the desired 4-week range... here's a start with 3 buckets.

    For the second one, do you have the formula that produced it in Excel? Is each date limited to that date and the 3 prior occurrences of that day of week? Is it then the average of those days across the 4 weeks? If yesterday was Monday, then total of yesterday's tickets, plus the 3 prior Mondays, divided by 4?

  • Thanks Chris - that makes total sense - I tired to take that logic and attempt the other graph required but the dates are tripping me up again - the formula for the current excel chart is simple - there is a list of ticket count per day multiplied by the 4 week period then divided by 28 days for the ave. 

     

    Really appreciate the help!

  • Hi Jo,

    There's an undocumented function for a running sum of previous periods: RPSUM(). It takes a value and a count of previous periods, where the type of period (month, day, etc.) is defined by whatever you have on the widget axis. 

    The orange is an RPSUM ( [Total Ticket Count] , 28 ), showing a running sum of the prior 28 days from the date on the axis. A nice thing about this RPSUM is that it's not just the 28 prior visible periods in the widget, but the 28 prior periods regardless of whether there was data. So if you have 1-Feb followed by 27-Feb because there were no sales on the dates in between, in will include those missing dates in the 28 prior.

    The black line is that same formula divided by 28, similar to your Excel formula.

    RPSUM( [Total Ticket Count] , 28 ) / 28
Reply
  • Hi Jo,

    There's an undocumented function for a running sum of previous periods: RPSUM(). It takes a value and a count of previous periods, where the type of period (month, day, etc.) is defined by whatever you have on the widget axis. 

    The orange is an RPSUM ( [Total Ticket Count] , 28 ), showing a running sum of the prior 28 days from the date on the axis. A nice thing about this RPSUM is that it's not just the 28 prior visible periods in the widget, but the 28 prior periods regardless of whether there was data. So if you have 1-Feb followed by 27-Feb because there were no sales on the dates in between, in will include those missing dates in the 28 prior.

    The black line is that same formula divided by 28, similar to your Excel formula.

    RPSUM( [Total Ticket Count] , 28 ) / 28
Children