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

Find Percentage of Specified Group

Status
Not open for further replies.

carlav60

Technical User
Jun 1, 2006
3
US
I'm using CR 11.

My reports looks similar to following:

GH1 Administrative Department Budget YTD Trans. % Spent
GH2 222 Human Resources $20,000 $5,000
GH2 231 Health $10,000 $1,000
GH2 233 Information Technology $25,000 $10,000
GF1 Total Admin Department $55,000 $16,000 29%

It is grouped by Department, with the divisions being a specified order of the Departments, and then grouped by division. The total % spent works by using the Sum ({table.Actual}, {table.GL_Level_2}) % Sum ({@Budget}, {table.GL_Level_2}). However, I can't get the % Spent to work for each individual division. It always gives me the total % spent. I've tried using both groups and nothing seems to work.

Is there another way I could set this up or does anyone know how I can find that percentage?

Thanks.
 
Can't tell which group is division versus department.

-LB
 
Administrative Department is an example of the department and Human Resources, Health, and IT are divisions.
 
For division, your formula should be:

sum({table.actual},{table.division})%sum({table.budget},{table.division})

For department, it should be:

sum({table.actual},{table.department})%sum({table.budget},{table.department})

-LB
 
Thank you LB. I did try that and it didn't work. What I ended up doing was using a running total for the divisions and then finding the percentage from that, which worked. I had set this project aside a couple of months ago and just picked it up again, so I wanted to finish it this time, and that was the only problem I was having.

Thanks, again, for responding to my question.
 
When you say something doesn't work, you should explain in what way. I guess you must have had duplicate records or something requiring running totals. Of course, the running total calculations would only be accurate in a group footer section.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top