ChrisSedgwick
Registered User.
- Local time
- Today, 17:04
- Joined
- Jan 8, 2015
- Messages
- 119
Hi,
I'm trying to run a query that calculates a figure over a certain number of months. The exact calculation is:
Contribution Value divided by Duration of Works
I then have the report set up to take into account the Anticipated Start Date. From this date it takes the results from the above calculation and splits the figure up over the duration.
I did have the calculation working initially, however now I want to multiply that result by the Probability. So if we say it's 50% probable that we will win the job. This affects the total result. Again all works fine on most of the records, apart from some which show #Div!0 or something to that effect. Then if I try to run the report, it gives me an error message saying "Divide by zero"
I'm not sure of any other way to get the query to not count the Div0's or if it can leave them blank.
Here's the formula
I've also attached a screenshot of the query result. Could someone explain how i can get rid of the #Div/0!
Thanks,
Chris.
I'm trying to run a query that calculates a figure over a certain number of months. The exact calculation is:
Contribution Value divided by Duration of Works
I then have the report set up to take into account the Anticipated Start Date. From this date it takes the results from the above calculation and splits the figure up over the duration.
I did have the calculation working initially, however now I want to multiply that result by the Probability. So if we say it's 50% probable that we will win the job. This affects the total result. Again all works fine on most of the records, apart from some which show #Div!0 or something to that effect. Then if I try to run the report, it gives me an error message saying "Divide by zero"
I'm not sure of any other way to get the query to not count the Div0's or if it can leave them blank.
Here's the formula
Code:
Contribution: IIf([Anticipated Duration of Our Workds]=0,0,IIf([Probability]=0,0,IIf([Quotes]![ContributionValue]=0,0,[Quotes]![ContributionValue]\[Project]![Anticipated Duration of Our Workds]*[Project]![Probability])))
I've also attached a screenshot of the query result. Could someone explain how i can get rid of the #Div/0!
Thanks,
Chris.