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!

Running Total under conditions 1

Status
Not open for further replies.

LizSara

Technical User
Oct 1, 2007
1,503
GB
I have a running total that gives me a distinct count of kiddies that have been allocated preference 21 per school they have been allocated to.

so the running total goes

Summarise:
distinct count of student.stud_id

Evaluate (use a formula)
{CHOICES.ALLOCATE_FLAG} = 'Y' and {CHOICES.PREFERENCE} = 21

Reset (on change of group)
Group #2 bases.base_name

which is fine

After that i have the same running total resetting on the LA of the school (reset on group 1)

After that i have the same running total again but not resetting at all.

again this is all working correctly for what it's doing currently.

what i need is for these 3 running totals to only include those kiddies who have expressed preference 1, 2, or 3 as well as preference 21 and for preferences 1, 2, and/or 3 (all that they have) to be allocate flag (status) 'R'

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Whoever battles with monsters had better see that it does not turn him into a monster. And if you gaze long into an abyss, the abyss will gaze back into you." ~ Nietzsche"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Are you saying that you want to count preferences for 1,2,and 3 to apply ONLY if they also have flag 'R'? If so, create a formula like this:

{@123}:
if {table.preference} in [1,2,3] and
{table.flag} = 'R' then 1

Then in the running total, use an evaluation formula like this:

{CHOICES.ALLOCATE_FLAG} = 'Y' and
{CHOICES.PREFERENCE} = 21 and
sum({@123},{student.stud_id}) > 0

This assumes that you have an inner group on student ID.

-LB
 
If i put student.stud_id as the inside group i'm getting 0's on all my totals with that formula.

I didn't have student.stud_id as a group before i only had bases.lea_no as group 1 and bases.base_name as group 2

all the running totals are in the group footer.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Whoever battles with monsters had better see that it does not turn him into a monster. And if you gaze long into an abyss, the abyss will gaze back into you." ~ Nietzsche"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Never mind, i've swapped the groups and it's fixed it.

Thank You :)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Whoever battles with monsters had better see that it does not turn him into a monster. And if you gaze long into an abyss, the abyss will gaze back into you." ~ Nietzsche"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top