### Help with last Formula...

Can you post a copy of the code you used in the view. We can use that as the basis for your code to sum values.

Looking again at the code, as you are quizzing the Invoices table (not the relationship) you need to include the word select in your statement, and your screenshot shows the customer relationship as CUSTOMER, so maybe make a couple of changes to

let myCust := CUSTOMER;
let xBeg := From;
let xEnd := To;

sum((select Invoices['Date of Invoice'>= xBeg and 'Date of Invoice' <=xEnd and Customer = myCust]).'Total inc GST' )

Regards John

Hi John,

this is the formula that was suggested first, which only gave me the total of all invoices. I was really after a formula to sum all Customer.Shop Sales which is what he kindly supplied in hes last post. Which did the job pefectly.

sum( Invoices['Date of Invoice'>= xBeg and 'Date of Invoice' <=xEnd].'Total inc GST' )

let myCust := Customer;
let xBeg := From;
let xEnd := To;

sum(Invoices['Date of Invoice'>= xBeg and 'Date of Invoice' <=xEnd and Customer = myCust].'Total inc GST' )

Hi John,

This is the formula used in the View Table.

let myCust := CUSTOMER;
let myFrom := From;
let myTo := To;
select Invoices where Customer = myCust and 'Date of Invoice' >= myFrom and 'Date of Invoice' <= myTo

1 2