Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

  • Newbies
Posted

I'm trying to create a summary of invoice totals per week buy can't get it to work. Can anyone help me with the correct formula? All help is greatly appreciated.

Thanks,

Rick

Posted

It's a little difficult to interpret your question. However if by "per week" you mean that you would like to see a total of the invoices for the current week (ie starting "last Sunday" and ending "next Saturday"), then here's one way you might approach it:

1. Create an unstored calculation field called cLastWeek, select result type date and enter the formula:

Let(T = Get(CurrentDate); T - DayOfWeek(T))

2. Create another unstored calculation field and call it cNextWeek, select result type date and enter the formula:

Let(T = Get(CurrentDate); T - DayOfWeek(T)+ 8)

3. Create a relationship from the current table to a new table occurrence of your invoice table (call the new table occurrence ThisWeeksInvoices) and define the relationship as:

cLastWeek < InvoiceDate

AND

cNextWeek > InvoiceDate

4. Create an unstored calculation in the current table called cCurrentWeekTotal, set the result type to number and enter a formula along the lines of:

Sum(ThisWeeksInvoices::InvoiceTotal)

...where "InvoiceDate" and "InvoiceTotal" are the names of the date and total fields in your invoice table.

The cCurrentWeekTotal calc (defined at step 4) should provide you with a current total for invoices dated within the current week. :D

  • Newbies
Posted

Thanks so much. I was able to make it work the way you instructed me to. It's exactly what I was looking for. I also want to create a "From" and "To" fields where I can enter a date range for example; "From: 1/1/2007" "To: 1/31/2007" and have a summarry field containing "Invoice Totals" for the generated results.

  • Newbies
Posted

Thanks so much. I was able to make it work the way you instructed me to. It's exactly what I was looking for. I also want to create a "From" and "To" fields where I can enter a date range for example; "From: 1/1/2007" "To: 1/31/2007" and have a summarry field containing "Invoice Totals" for the generated results.

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