Jump to content

Self-Join? Calculations?


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

Recommended Posts

I have a database called versions. there is a job number field in this database. there may be many records with the same job number (different versions of a project). There is a field called sales status. This field can have one of two values - "Available" or "Sold." I'd like to be able to have a calculation field that would tell me how many versions with the same job number have been sold and thus have the value of "Sold" in the sales status field. i'm so far havin no luck. any suggestions?

Link to comment
Share on other sites

Create these fields.

iOne = 1 (Stored, Nubmer)

JobStat = Job_Number & Status (Stored, Text)

JobSold = Job_Number & "Sold" (Stored, Text)

JobAvail = Job_Number & "Available" (Stored, Text)

Create 2 Self-relationships..

Sold = JobSold::JobStatus

Available = JobAvail::JobStatus

Create These Fields...

CountSold = Count(Sold::iOne)

CountAvail= Count(Available::iOne)

This will tell you how many Sold or Available you have per job number but not tell you how many "Different Versions" you have, you'd have to take it a step further and add the "version" number/letter to the indexes and create more relationships and count fields depending on the number of possible versions.

[ March 30, 2001: Message edited by: Ocean West ]

Link to comment
Share on other sites

OOoh! That worked like a charm. I never thought of combining both the job number and status fields into one field - thanks!

I've already got the number of versions for each project in a field. I have job number self-joined to itself. then I have a calculation field "Versions Sold" that is Count(Job Number::Version Name).

Thanks for the quick reply and help!

[ March 30, 2001: Message edited by: Jason Whetstone ]

Link to comment
Share on other sites

This topic is 8449 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.