Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formula help

Status
Not open for further replies.

deeya

MIS
Sep 18, 2006
78
GB
Hello all,

CR10 SQL SERVER.

I have two groups Server Name and Trenddatetime.

What I would like to do is calculate the diff in disk space from the previous days disk space ?? 3rd column.

Second i want to calculate the average diskspace usage a day 4th column.

Finally from the average i want to divide the diskspace left from the most recent date and give an approx date the disk space will run out.

Trenddatetime Diskspace Diff from Ave Estimated date
172.20.4.99 previous Day ?? to 0 disk
21/12/2006 219,386 ??
20/12/2006 219,466 ??
19/12/2006 219,559 ??
18/12/2006 219,642 ?

I know its asking a lot but I thought it would be better to ask in one post rather than a few.

Many Thanks for your help forum.
 
You can get the difference using Diskspace - Previous(Diskspace). Use a running-total count to identify the first record and avoid doing the calculation for it.

As for averages, the problem is that the difference data derives from more than one record, so Crystal won't let you summarise it. You could do summary totals for minimum and maximum Diskspace and then divide this by the number of record. From that you should be able to get the days left.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Madawc many thanks.

The formula you supplied would only work on the detail section I think and not on a group.

The disk space by day is broken down in half hourly intervals hence the group 'Trenddatetime', so in my example the disk space was the last time it was recorded e.g at 23:00. So I would want to capture the last diskspace recorded during that day, any clues?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top