on 05-21-2014 1:44 PM
Hi EveryOne,
i got this error while doing the (neumarator)/(denamarator)*100 how to resolve it.
What I've typically done to resolve this type of error is embed a condition on the denominator to check for 0. If the denominator is 0, I use 1 otherwise I use the denominator value.
This of course is highly dependent on what you're trying to achieve though, so it might not make sense in your instance.
eg:
=[nominator]/ (If [denominator]=0 OR IsNull([denominator]) Then 1 Else [denominator])
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are different ways depending what you want to display.
If you have a field and it is trying to evalute 55/0, what does that mean in the context of that report?
If you are looking at, say, number of runs divided by number of errors to get average runs per error, is 55 correct? Is 0 correct? Neither are correct because you don't have an error in any of your 55 runs but how do you want to represent that in your report?
If you say 55 on the basis that there are no errors and you will accept 0 errors the same as 1 error then use =If([d]=0;[n];100*[n]/[d])
If you want it to be 0, use Ajay's suggestion but the overall answer is that it depends entirely on what you want it to be - use an If statement to detect the 0 and present what you want to present.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Stefen,
You need to create the following variable.
If ( [denamarator] = 0 ; 0 ; ([neumarator] / [denamarator]) * 100
Regards,
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.