September 17, 200322 yr Hi All, First time poster in desperate need of help. I have a simple DB tracking actors at a talent agency. Each actor is assigned a Division via a value list: infants, kids, young adults, seniors. Each actor also has an Agent Status of a simple yes, no. How do I get a running percentage of each Division's Agent Status? 50 kids total, 20 have agents = 40%. I've gotten it to work, but only via a trailing grand summary on a dedicated layout for each Division. How do I get the percentage fields for each division to display correctly and update automatically and globally at the top of my main layout? I know this is a lot to ask from a new member but any help would be greatly appreciated.
September 17, 200322 yr You need to set up some self-join relationships, one for each Division. Create 4 calculated fields whose formulae are simply the constant values: cConstInfants = "Infants" cConstKids = "Kids" cConstYoungAdults = "Young Adults" cConstSeniors = "Seniors" Then create 4 relationships: sjInfants: cConstInfants matches Division sjKids: cConstKids matches Division sjYoungAdults: cConstYoungAdults matches Division sjSeniors: cConstSeniors matches Division Now create 4 unstored calculations: cAvrgInfants = Sum(sjInfants ::Agent Status)/Count(sjInfants ::Division)*100 cAvrgKids = Sum(sjKids::Agent Status)/Count(sjKids::Division)*100 cAvrgYoundAdults = Sum(sjYoungAdults::Agent Status)/Count(sjYoungAdults::Division)*100 cAvrgSeniors = Sum(sjSeniors::Agent Status)/Count(sjSeniors::Division)*100 These calculated fields will give you your percentages.
September 17, 200322 yr Hi Bob, Hmm.. cAvrgInfants = Average(sjInfants ::Agent Status)*100 cAvrgKids = Average(sjKids::Agent Status)*100 cAvrgYoundAdults = Average(sjYoungAdults::Agent Status)*100 cAvrgSeniors = Average(sjSeniors::Agent Status)*100 with AgentStatus = is notEmpty(AgentField) Wouldn't that work too...
September 17, 200322 yr Author Hi Bob and Ugo, Thanks so much for your input! I'm trying these out now and hopefully I wont screw it up. Am I correct in assuming that no grand summary part is required for this to work as you describe?
September 18, 200322 yr Author Stymied already! When I try to create the first calculation field and use ConstYoungAdults = "Young Adults" I get a "This Field Cannot Be Found" error. Do I need to "point" this calculation at my Division field? Thanks again in advance.
September 18, 200322 yr The Professor said: Stymied already! When I try to create the first calculation field and use ConstYoungAdults = "Young Adults" I get a "This Field Cannot Be Found" error. Do I need to "point" this calculation at my Division field? Thanks again in advance. ConstYoungAdults is a field_name "Young Adults" should be entered in the box qith quotes, and obviously must match one of your Division Name. As for your previous question, no you don't need a Grand Summary for this to work. It's based on relationship while Summaries are based on the founds...
September 18, 200322 yr Author Worked like a charm! Bob and Ugo, thank you so much for taking the time for a newbie.
Create an account or sign in to comment