Hi,
I'm trying to calculate a few fields in a report. All I need to do is find the total number of sales that are finished, and the total number of sales that are canceled for any certain employee. Then I need to calculate a percentage based on the completion of their sales.
I have 3 different text boxes,
1. txtFinishedSales
2. txtCanceledSales
3. txtCompletionPercent
Both txtFinishedSales and txtCanceledSales are based off the same source in a query called "Status". What I have as the control source for 1 is
=Abs(Sum([Status]="Finished"
)
and for 2 I have
=Abs(Sum([Status]="Canceled"
).
I'm having to use the abs function because in the table the field value is based off of a check box which gives me either a -1 value or a 0 value.
Both of these values come up fine, the problem I am having is calculating the percent. in my 3rd text box I have tried putting all kinds of combinations, but nothing has worked yet. Basically I need it to be something like
sum((txtFinishedSales + txtCanceledSales)/ txtFinishedSales)
in txtCompletionPercent
But at best, no matter which way I've tried it, I get a parameter box asking for the value of txtFinishedSales and txtCanceledSales.... If anyone could help with this it would be much appreciated.
Michael
I'm trying to calculate a few fields in a report. All I need to do is find the total number of sales that are finished, and the total number of sales that are canceled for any certain employee. Then I need to calculate a percentage based on the completion of their sales.
I have 3 different text boxes,
1. txtFinishedSales
2. txtCanceledSales
3. txtCompletionPercent
Both txtFinishedSales and txtCanceledSales are based off the same source in a query called "Status". What I have as the control source for 1 is
=Abs(Sum([Status]="Finished"
and for 2 I have
=Abs(Sum([Status]="Canceled"
I'm having to use the abs function because in the table the field value is based off of a check box which gives me either a -1 value or a 0 value.
Both of these values come up fine, the problem I am having is calculating the percent. in my 3rd text box I have tried putting all kinds of combinations, but nothing has worked yet. Basically I need it to be something like
sum((txtFinishedSales + txtCanceledSales)/ txtFinishedSales)
in txtCompletionPercent
But at best, no matter which way I've tried it, I get a parameter box asking for the value of txtFinishedSales and txtCanceledSales.... If anyone could help with this it would be much appreciated.
Michael