Jump to content
Server Maintenance This Week. ×

Sub Summary for a Calculation


This topic is 6549 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Alright, I'll try to make this brief and to the point. Three tables. Royalty DB.

Table 1...Project

Table 2...Tracks (ProjectGroupSubtable)

Table 3...Group

I want a calculation which summarizes the number of tracks by a group on a certain project. (This will then be used in a seperate calculation to figure out royalties)

Right now whenever I try to use Count(field) it counts tracks by a Group over all the projects instead of just one.

I've read about using sub-summary parts, but I'm under the impression that these wouldn't fit my situation, am I wrong?

Thanks!

jon

Link to comment
Share on other sites

Im not sure if im understanding the problem correctly seeing as i dont see where project comes in... but anyway.

If tracks is a subtable of group... i.e. 1-1

Relate Tracks to a second Tracks table occurance via the group identifier (foreign key). Then create an unstored calc in this table occurance to count over that relationship.

If thats not what your after, maybe im just not getting it, but if you could clarify a bit that'd be great.

~Genx

Link to comment
Share on other sites

Sorry about that, the Project would be like the album which has a number of tracks on it by different groups.

A group could be on a couple of projects and therefore the track count for a group always seems to add up all the total tracks for all the projects that they are in, which doesn't help me very much.

So again

Table 1

pk.projectID

Table 2

fk.projectID

fk.groupID

pk.trackID

Table 3

pk.groupID

Edited by Guest
Link to comment
Share on other sites

This topic is 6549 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.