Im trying to make sumif type totals. I have a list of transactions each with a specifice name. Im trying to get totals of each with the same names. Not lists of them but just the name with the sum. Hope this is not too vague. Eg names are say. Electric, Gas, and so on and just have total of all say Gas without listing them all. Thank you
Hi Faldo,
Welcome to The Soup.
You could do this with a summary field and a subsummary layout part.
Summary fields will do count, total, average, Std Dev, etc.
Check out Defining summary fields
Another technique:
Make one field in the transaction table per category, where the value is blank if it’s not in the category, otherwise equal the to the transaction:
Transactions::cGasTransactions : calculated field : If(Transaction::name = "Gas"; Transaction:value; "")
Then in your main table, you can do calculations on this related field:
Main::GasTransactionTotal = Sum( Transactions:: cGasTransactions); // gets the total value of all "Gas" transactions
or
Main::GasTransactionCount = Count( Transactions:: cGasTransactions); // gets the Number of "Gas" transactions
Away on holiday will check when back but i think easiest method as all above me all the formulas
Please note that the SumIf() custom function does not handle missing values properly. In this example, notice how the missing scores are causing the totals to be miscalculated:
I made an improved SumIf() custom function which can handle either field references (Table::Field) or Lists(). Custom Function than handles field reference OR List of values? - #4 by xochi
