Jump to content

Problems with Summaries and Relationships (?) on a different table


Recommended Posts

I'm not even sure to describe under which category my specific problems fall into, I can only advance some hypothesys, so I'll just describe it and let the wisdom of others guide me.

I have a DB with several tables, I use them to make invoices. With every invoice I input the desired price and it adds automatically 19% taxes and produces a neat invoice which I can print, these three tables are called:

Invoices 2018
Invoices 2019
Invoices 2020

Now on to my problem. I wanted to create a forth table where from every previously listed table it would calculate the total revenue of the year in question, broke down like this:

- Total Net price paid for 2018
- Taxes for 2018
- Total revenue for 2018 (net+taxes)

- Total Net price paid for 2019
- Taxes for 2019
- Total revenue for 2019 (net+taxes)

- Total Net price paid for 2020
- Taxes for 2020
- Total revenue for 2020 (net+taxes)

 

I am unsure how to proceed, I tried creating a forth layout and a new table but I have problems brining the summary field from each year's table into the forth table/report/layout.

Edited by Mafia2020
Link to post
Share on other sites

I would suggest you consolidate your three invoice tables into a single table with a field for year. Then it's a simple matter of sorting the invoices by year and showing them in a layout with a sub-summary part by year (and no body part). To show the stats you want place these three fields inside the sub-summary part:

  • a summary field totaling the invoice net mount;
  • a summary field totaling the invoice tax amount;
  • a summary field totaling the invoice total amount - or a calculation field adding the other two sub-totals.

---
P.S. Please update your profile to reflect your version and OS so we know what you can use.
 

Edited by comment
Link to post
Share on other sites

I consolidated the three tables into one as you suggested, I can now get a total revenue/tax/etc for all three years which is fine, how can I get, though, revenues broken down by year? Perhaps with a calculation field where I specify to take into account (sort?) records year by year? Should I use GetSummary or Sum?

I tried to add an InvoiceYear field and a Summary field which is a sum of total of each invoices which produces some sort of lifetime revenues; then I created a Calculation field with : GetSummary ( sLifetimeRevenue; InvoiceYear) but it doesn't seem to work.

Edited by Mafia2020
Link to post
Share on other sites

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
  • Similar Content

    • By wdrspens
      In list view my fields extend off the available screen area.  In Layout Mode the Top Navigation part scrolls to the right together with the Body part, BUT when I exit Layout the Top Navigation part does NOT scroll when I scroll to the right in the Body part.  How do I keep the Top Navigation Part in line with the Body Part?    This is thoroughly disconcerting as my field labels are all in the Top Navigation Part, but the fields are in the Body Part.  The two do not align as I scroll to the right.  Any suggestions would be gratefully received.  
      Problem Solved - I should have put the labels in 'Header' rather than 'Top Navigation'.  Now the scrolling works
    • By fousthvk
      Does anyone know how to do this? calling the "generate as configured" script stacks the script that gets called after the webveiwer is set at the end of the primary script, there for only the last record in the found set of the loops actually has the image file created and saved to the container field.
    • By bgscott
      Recently converted a FM application from V6 to V19.  The application will run on FM server.  Very new to FM19
      Questions related to temporary path
      I have scripts that exports data to 3 temporary fm12 files.  Two of the temp files hold data that is them imported to other files and one of the temp files holds data for a lookup in another file.
      dhistory imports data from dtemp
      rhistory imports data from rtemp
      vendors looks up data from vtemp
      The temp files are fm12 files
      Questions
      1.  I would like to have the temp files sent to the temporary path on the users computer.  I have not been able to correctly specify the output path to send the temporary files to the temporary folder on the users computer.  This is one attempt: get(temporarypath) & dtemp but this does not sentd the file to the temporary folder
      2.  Once I get the correct syntax to save the temporary files in the temporary folder, how do I tell the import records script step where to find the temporary files?  What is the correct way to point to the file so it would work on any users computer?
      3.  Vendors file performs a relookup in vtemp, so I need a relationship between vtemp table, located in temporary folder, and vendor table.  How do I specify the location of vtemp so it can be found on any users computer?
      Once the script finish running the temporary files are no longer needed and it is my understanding that the temporary files will be deleted when the Filemaker session is closed.
    • By milky
      Hi All,
      Just had a look at the new Add-ons in Fm19.
      Is there a way to make the timer work in reverse.
      i.e. Start from a field (Timer::TimeLength) that a user can input, so that the specified time of say 30:00 will run down to 0:00
      Any help would be appreciated.
      Regards
       
      Milton.
    • By BostonFM
      I am trying to script an import of three worksheets in the same Excel file. The 3 geographical regions worksheets are not structured the same, i.e. field name rows are not in the same place and are named differently.
      The script runs but stops to ask which worksheet to process.
      How do I create a variable/parameter in the script for it to proceed sequentially from worksheet 1-3 without stopping?
      Thanks
      DA
×
×
  • Create New...

Important Information

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