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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping Data into Sets for Chart

Status
Not open for further replies.

CJP12711

MIS
Jul 23, 2001
116
US
Hello! I have a number of different values in a field:

Total Time:
1, 6, 2.4, 32, 8,....

I need to chart this data, in increments of 2 minutes. The Y axis would have the number of cases - just a simple count.

So, the 1 would fall into the '0-2 minutes' group, the 6 would fall into the '2-4 minutes' group, etc. I need these increments to go up to 60 minutes. Is there a quick way to create these groups - by formula, or in a line chart? I've been entering them 1 by 1, if x then 'group 1' else, if x, then 'group 2', etc... The code is getting a bit long!

Any help is appreciated!
CJ
 
1 other question. When I am typing out the formulas for each one, I am creating the labels for the groups. How can I order these in the appropriate order, starting at the 0-2 min group all the way through the > 60 min group? Right now, it groups things as it would a text field - all the labels starting with 1 are together, then all the 2's, etc...
 
To get 2-minute units, try
Code:
2*(Truncate({minutes}/2))

This should also produce decent labels.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Hello! This does work well, although I need to have a >60 option at the end so we don't list out all of the actual numbers... Thanks again!
CJ
 
Hello, I am still not able to get the >60 group on the chart, without turning all of the values into strings. When they are strings, they are out of order. I need them to be in order by number - 2,4,6,8,... >60.

Does anyone have ideas how to accomplish this?

Thanks!
CJ
 
1) Try using the HISTOGRAM charttype?
2) If all else fails, this would be easy to do with the CRChart add-in library (which costs $$$). It has much better support for this kind of stuff.

-Dan

DISCLAIMER: I work for the company that makes CRChart.

Dan Weingart
OEM Technical Manager
Three D Graphics, Inc.
 
With strings, you can include your own ordering. Like "To 02", "To 40", "z) >60"

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top