| Author |
Message |
Dr4ke
Senior Member
Joined: 09 May 2014
Online Status: Offline
Posts: 209
|

Topic: Daily Growth Posted: 07 Oct 2014 at 6:21am |
|
Hi All,
I am collecting statistics for a machine at a set interval (say every 15 minutes). What I would like to do is to establish a Daily Growth figure from the reporting data (which will become a parameter).
Does anybody have any good methods for this?
|
IP Logged |
|
|
|
hello
Groupie
Joined: 05 Feb 2014
Online Status: Offline
Posts: 85
|

Posted: 08 Oct 2014 at 4:19am |
|
What kind of "machine"? A computer?
Maybe create a DOS batch file that contacts the computer every 15 minutes. The batch file could be kicked off with scheduled tasks in the Windows task manager.
|
IP Logged |
|
Dr4ke
Senior Member
Joined: 09 May 2014
Online Status: Offline
Posts: 209
|

Posted: 08 Oct 2014 at 5:01am |
|
Sorry I think the question has been misunderstood; I am already collecting the data (Disk Size, Disk Used etc) every 15 minutes.
What I was asking is the best way to portray this in Crystal Reports and show daily growth based on a Daily 'Disk Used' figure.
|
IP Logged |
|
Dr4ke
Senior Member
Joined: 09 May 2014
Online Status: Offline
Posts: 209
|

Posted: 08 Oct 2014 at 5:17am |
|
To Expand further; I have Grouped the date field on a 'daily' basis which provides the following used column:
first date - 50 second date - 51 third date - 53 fourth date -48
What I want to do is work out the difference in figures from this group:
first date - 50 second date - 51 - 1 third date - 53 - 2 fourth date -48 - -(minus) 5
hope that makes more sense.
|
IP Logged |
|
z9962
Senior Member
Joined: 04 Jul 2012
Online Status: Offline
Posts: 161
|

Posted: 08 Oct 2014 at 9:58pm |
|
Try using a running total... Think this will be best bet.
|
IP Logged |
|
Dr4ke
Senior Member
Joined: 09 May 2014
Online Status: Offline
Posts: 209
|

Posted: 08 Oct 2014 at 10:09pm |
|
I have tried a few different combinations of a running total to try and get this to work but it doesn't seem to work in a Group Header; only in the details section.
Any ideas?
|
IP Logged |
|
z9962
Senior Member
Joined: 04 Jul 2012
Online Status: Offline
Posts: 161
|

Posted: 08 Oct 2014 at 10:32pm |
this formula will do it... shared numbervar p; shared numbervar c; local numbervar r; c:=Sum ({numberfield}, {Datefield}, "daily"); r:= c-p; p:= Sum ({numberfield}, {Datefield}, "daily");
if groupnumber =1 then 0 else r;
|
IP Logged |
|
Dr4ke
Senior Member
Joined: 09 May 2014
Online Status: Offline
Posts: 209
|

Posted: 08 Oct 2014 at 10:45pm |
|
That is doing something but it's not giving the right results and is coming up with the below:
75,091.98 -- 0.00
75,072.38 -- -5,643.65
75,268.66 -- 56,528.22
75,855.41 -- 168,983.61
When I am expecting
75,091.98 -- 0.00
75,072.38 -- -19.6
75,268.66 -- 196.28
75,855.41 -- 586.75
I'm actually quite confused by your formula so I can't even make a variation of it; looking at it I would be expecting every result to be 0 as "r:= c-p;" and c & p are the same formula...
And I'm not sure what r is doing :-S
|
IP Logged |
|
z9962
Senior Member
Joined: 04 Jul 2012
Online Status: Offline
Posts: 161
|

Posted: 08 Oct 2014 at 11:07pm |
r=result, c=current, p=previous. its the order of the formula that makes this work. you could change p:=c; Are putting this formula in the date group? the 75091.98 etc is just summing a particular field?
|
IP Logged |
|
Dr4ke
Senior Member
Joined: 09 May 2014
Online Status: Offline
Posts: 209
|

Posted: 08 Oct 2014 at 11:12pm |
|
Sorry no that (p:=c;) still shows the same results.
By order of the formula do you mean because p is after the calculation (r) it will show the previous result?
The formula is in the Group Header which is Date (by day).
the numbers shown (75091.98 etc) is the size of the disk in question, in MB. Sorry for not explaining that.
|
IP Logged |
|
|
|