Newbies jamesbr Posted January 20, 2006 Newbies Posted January 20, 2006 Hi all, wonder if you can help me. I'm trying to create a calculation field which compares similar records in a table, and I think a self-join relationship should do it, but can't figure it out! Specifics: There is a record for each exhibition visit. Exhibitions are annual (e.g. Exhibition X 2004, Exhibition X 2005, Exhibition Y 2003, Exhibition Y 2005 etc). Where someone has visited the exhibition in the previous year I want to display the difference in price he/she paid for that year. In other words: Ticket Price Exhib X 2005 - Ticket price Exhib 2004. Can I do this via a self-join relationship? I've tried relating a second occurance of the table via exhib name (without year) and visitor name, then creating a calculation field to compare years (if year=year-1 then calculate price difference), but it doesn't seem to work! any help appreciated. james
Wim Decorte Posted January 21, 2006 Posted January 21, 2006 See attached file. A little to complex to explain here, but see if you have any questions about the setup. There might even be better ways, I didn't spend much time on this and I don't really like the way I had to lookup. Using a recursive custom function with the GetNth function would probably better from a database-structure standpoint. fmforums_eventAttendance.zip
Newbies jamesbr Posted January 21, 2006 Author Newbies Posted January 21, 2006 Thanks for your help - i'll look at it in detail on monday, but definitely looks like it will achieve what i'm after. thanks again jamesb
Recommended Posts
This topic is 6883 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 accountSign in
Already have an account? Sign in here.
Sign In Now