Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to sum a formula field

Status
Not open for further replies.

EngJoo

Programmer
May 14, 2002
90
MY
Greeting,

i would like to sum a formula field which is having the error message

"the summary/running total field could not be created"

while i write sum(@formula1).

but i really need to sum it.

i have been tried to sum it by using the running total solution. but i can't find the (@formula1) field from the list.

i hope that anyone of you can guide me through.

i appreciate for your kindly attention.

 
Please show the details of the formula and also where you are trying to place it. A little information about your report might help, too.

-LB
 
{@formula1}
= if {@Different Date} in 0 to 30 then {#Outstanding}

and i put this field on GF3 footer.

then i would like to sum it.

is that the information that you needed Ibass?
hope you can help.
 
What is your formula for {@different date}? And why are you trying to make the running total {#outstanding} conditional? You might be able to build the conditions into your running total, but I need to understand your report better to be able to help. Please give a quick breakout of how you developed the running total. What are your report groups?

-LB
 
{@Different date}

= datediff('D', {open_item.inv_date}, CurrentDate)

the reason why i make the running total {#outstanding} conditional is because the data displayed on the DETAIL is not unique(having a duplication value added) due to a lot of table had been linked.

so i GROUP 1st=company, 2nd=cust_no, 3rd=invoice_no and 4th=invoice_line_no

i need to use running total in order for me to get the unique and accurate value which is obtained from group.

now i can be able to get the detail outstanding for each customer.but the problem is i cannot sum up all by each company(group 1st).

thank you for prompts response.

 
if you want to limit your running total to records that fall within a 30-day period, you don't have to do a separate formula--you can just evaluate based on a formula and add your condition right into the running total, e.g.,
select {youramtfield}, choose sum, evaluate based on a formula:

datediff("d", {open_item.inv_date}, CurrentDate) in 0 to 30

Reset on change of Group 2 (customer).

Now, at the company level, create a new running total with the same elements, but just change the reset to Group 3 (company), and place this in the company group footer. If you need to exclude other records, there are ways of tailoring the formula to do that.

Let me know if this gets you closer to what you're looking for.

-LB
 
yes! its almost what i want. and its make my life more easier.

but under the evaluate options. due to my grouping have inv_line group. i couldn't get unque value.
for example

cust_no inv_line_no amount
1111 1 200
1111 2 200

based on the setting that you taught me, i obtained 400
but the actually i just want 200.

i tried to put the evaluate under inv_line_no group then the problem resolved but its back to my problems earlier.. which means i cannot obtain the company subtotal.

 
Try adding this to your conditional formula:

and {table.inv_line_no} <> previous({table.inv_line_no})

Please let me know if this doesn't resolve the problem.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top