I have a formula called Average Days that displays the average number of days between invoices. Here is the formula:
{@DateDiff Spread}/Count ({ARFID.INVOICE_NUMBER}, {ARFID.CUST_PART_ID})
Here is the DateDiff Spread formula referenced above:
(Maximum ({ARFIM.INVOICE_DATE}, {ARFID.CUST_PART_ID})-Minimum ({ARFIM.INVOICE_DATE}, {ARFID.CUST_PART_ID}))+{@Current Date - Max}
The Average Days formula is working and displaying the correct values. However, I need to be able to use its results as part of an aglorithm formula that assigns weights to other values then displays 1 final value.
When I reference the Average Days formula in another formula, I get an error:
"A summary has been specified on a non-recurring field.
Details: @Sales Sum"
Sales Sum is the formula that should display the final value. I think the issue is that I'm trying to reference a formula that references Maximum and Minimum summary values, but I'm not sure how to work around this.
I haven't worked with variables much, but here is what I tried with no success.
I edited the Average Days formula to:
whileprintingrecords;
Shared NumberVar avgdays := {@DateDiff Spread}/Count ({ARFID.INVOICE_NUMBER}, {ARFID.CUST_PART_ID});
I then created a new formula called AvgDaysVariable and called the variable:
Shared NumberVar avgdays;
The variable value displays correctly but I'm still unable to use the variable value in another formula.
I tried using the variable in this formula:
({@QTY Previous 30 Days}*10)+{@QTY Previous Year}*1.5 + shared numbervar avgdays
I also tried calling the other formula field:
({@QTY Previous 30 Days}*10)+{@QTY Previous Year}*1.5 + {@AvgDaysVariable}
Either way, I'm still getting the same error.
Any help would be great.
{@DateDiff Spread}/Count ({ARFID.INVOICE_NUMBER}, {ARFID.CUST_PART_ID})
Here is the DateDiff Spread formula referenced above:
(Maximum ({ARFIM.INVOICE_DATE}, {ARFID.CUST_PART_ID})-Minimum ({ARFIM.INVOICE_DATE}, {ARFID.CUST_PART_ID}))+{@Current Date - Max}
The Average Days formula is working and displaying the correct values. However, I need to be able to use its results as part of an aglorithm formula that assigns weights to other values then displays 1 final value.
When I reference the Average Days formula in another formula, I get an error:
"A summary has been specified on a non-recurring field.
Details: @Sales Sum"
Sales Sum is the formula that should display the final value. I think the issue is that I'm trying to reference a formula that references Maximum and Minimum summary values, but I'm not sure how to work around this.
I haven't worked with variables much, but here is what I tried with no success.
I edited the Average Days formula to:
whileprintingrecords;
Shared NumberVar avgdays := {@DateDiff Spread}/Count ({ARFID.INVOICE_NUMBER}, {ARFID.CUST_PART_ID});
I then created a new formula called AvgDaysVariable and called the variable:
Shared NumberVar avgdays;
The variable value displays correctly but I'm still unable to use the variable value in another formula.
I tried using the variable in this formula:
({@QTY Previous 30 Days}*10)+{@QTY Previous Year}*1.5 + shared numbervar avgdays
I also tried calling the other formula field:
({@QTY Previous 30 Days}*10)+{@QTY Previous Year}*1.5 + {@AvgDaysVariable}
Either way, I'm still getting the same error.
Any help would be great.