How to compare cumulative counter vs the historical best/max, average and worst /min?

Asked by jerome

Hi all,
I have a counter that measures the number items sold every 10 minutes. I currently use this to track the cumulative number of items:

alias(integral(app.items_sold), 'Today')
And it looks like this:
http://i.stack.imgur.com/pZuld.png

today's data

Now, what I want to do to show how well we were are doing TODAY vs best, avg (or may median) worst day we've had for the past say 90 days. I tried something like this:

alias(integral(maxSeries(timeStack(app.items_sold, '1d', 0, 90))),'Max')
alias(integral(averageSeries(timeStack(app.items_sold, '1d', 0,90))), 'Avg')
alias(integral(minSeries(timeStack(app.items_sold, '1d',0, 90))), 'Min')
today's vs max/avg/min

http://i.stack.imgur.com/t8kqQ.png

which looks great but actually shows me the cumulative amount of all the max, avg and min for all series interval.

Can anyone suggest a way to achieve what I'm looking for? i.e. determine what the best (and worst and median) day was for the past 90 days and plot that. Can it be done using purely Graphite functions?

Thanks.

Question information

Language:
English Edit question
Status:
Expired
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
jerome (jerome-provensal) said :
#2

Anyone who could help me with this?

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
jerome (jerome-provensal) said :
#4

Turner (in the <email address hidden> board) responded to my question as follows:

you want the sum for each hour from your best day, not the sum of all your best hours. i think you just need to reorder your functions:
alias(maxSeries(integral(timeStack(app.items_sold, '1d', 0, 90))),'Max')
alias(averageSeries(integral(timeStack(app.items_sold, '1d', 0,90))), 'Avg')
alias(minSeries(integral(timeStack(app.items_sold, '1d',0, 90))), 'Min')