This discussion is archived
0 Replies Latest reply: Sep 1, 2012 12:05 PM by 572762 RSS

How to create a $ per second report.

572762 Newbie
Currently Being Moderated
I have a scenario where I have several stores all posting sales in real time to a BAM object.

The Fileds are:

StoreID "string"
PurchaseDate "datetime"
PurchaseAmount "integer"

I like to create a report that will display the sales per second for a given store over a defined Period of time.

As an example:

If the report is run and 60 seconds is entered as a report parameter for the period of time and StoreID set to "1" (also via paramter) then I'd like to know what was the average sales per second over the last 60 seconds for StoreID 1.

Obviously this report would be continually updating giving me a real time gauge indicating when sales per second has dropped or spiked.

A real example:
Lets say there are 3 sales in the last 60 seconds for StoreID 1 as follows -
1,3/20/1977 3:08:08 PM,100
1,3/20/1977 3:08:14 PM,160
1,3/20/1977 3:08:33 PM,100

If I ran the report at 3/20/1977 3:08:34 PM there would only be 3 entries which fall within the last 60 seconds (Report Paramter) for StoreID 1 (Report Paramter). And averaging out the sales total would give me (100+160+100)/60=6$/second

Can anyone point me in the right direction on how to solve this?

D

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points