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

Syntax for dynamic calculated member (for Av) in Crosstab, Crystal Reports 2008

Status
Not open for further replies.

PetDet

Technical User
Aug 7, 2013
2
0
0
AU
Hi All,

I am trying to add a calculated member into my cross tab that calculates the average over a number of months, I can get a static calculation to work via calculated member, however the number of months that report will vary (depending on the user selected parameters of: hospital "area" to report on, and Financial Year). I pull whatever data there is available in the DB for that area and Financial Year.

For current Financial Year, for some "area" parameter selections there are only three months worth of data at any one given time (until the data is submitted to our DB), for others there are five etc. I was wondering if you could please help me to make a calculated member dynamic so that the average checks how many months of data there are and then calculate on that. Below is what I am hoping to achieve. Sorry if the picture doesn't work out.

CrossTab.JPG


Thanks in advance [sunshine]
 
Which version of Crystal? Mine includes "average" as one of the options for a summed field. You can adjust using the Crosstab experts.

Or is it that you need to use different numbers of month? If so, make that a formula field and then use it to average against something else. I've never actually done this, but it should work.

It always helps to give your Crystal version - 8, 8.5, 9, 10, 11, 2008 or whatever. Methods sometimes change between versions, and higher versions have extra options.

If you can't get the Crosstab to do what you need, consider a subreport. The subreport slows processing because it does its own call to the database, but they are useful.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
Hi Madawc,

It is Crystal 2008 (I included this in the post title). Basically the number of months of data that may be available to the group (which is a parameter) will change. That is one group may have 3 months worth of data, another group will have 5 months worth of data and so on. I need the calculated member to be able to dynamically calculate however many months of data may be available for that group (Selected via the parameter) and then calculate the average based on that.

I haven't tried the sub-report idea though. I might give that a go. Thanks for the idea.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top