If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
calculated field doesn't show the correct data
I have 3 fields in a query and in a report: Aug, FAug, and AugP.
In the query AugP is being calculated as follows: =IIf(nz([FAug])0,nz([Aug])/nz([FAug]),IIf(nz([Aug])0,1,0)). So, if Aug 0 and FAug = 0 or Null it should be 1 (or 100%). The query shows it correctly as 1. But, in the report it appears as 0 (0.00%). Even when I copy this formula in the report AugP field it's 0 anyway. Could anybody advise anything about how to fix it? Thanks |
#2
|
|||
|
|||
Some additional info:
When I change the format for the AugP to the General number it appears correctly as 1 (in case of Aug0 and FAug =0). "Alex" wrote: I have 3 fields in a query and in a report: Aug, FAug, and AugP. In the query AugP is being calculated as follows: =IIf(nz([FAug])0,nz([Aug])/nz([FAug]),IIf(nz([Aug])0,1,0)). So, if Aug 0 and FAug = 0 or Null it should be 1 (or 100%). The query shows it correctly as 1. But, in the report it appears as 0 (0.00%). Even when I copy this formula in the report AugP field it's 0 anyway. Could anybody advise anything about how to fix it? Thanks |
#3
|
|||
|
|||
I could be off here, but it does not look like you used the Nz function
properly. You do not tell it what to substitte for a null value... nz([FAug],????) ???? should contain your substitute value. Does is assume "0" if you leave out that argument? Rick B "Alex" wrote in message ... Some additional info: When I change the format for the AugP to the General number it appears correctly as 1 (in case of Aug0 and FAug =0). "Alex" wrote: I have 3 fields in a query and in a report: Aug, FAug, and AugP. In the query AugP is being calculated as follows: =IIf(nz([FAug])0,nz([Aug])/nz([FAug]),IIf(nz([Aug])0,1,0)). So, if Aug 0 and FAug = 0 or Null it should be 1 (or 100%). The query shows it correctly as 1. But, in the report it appears as 0 (0.00%). Even when I copy this formula in the report AugP field it's 0 anyway. Could anybody advise anything about how to fix it? Thanks |
#4
|
|||
|
|||
Thanks everybody. It's done.
The miracle was that the textbox for this field was too small and the first number didn't appear. "Alex" wrote: Some additional info: When I change the format for the AugP to the General number it appears correctly as 1 (in case of Aug0 and FAug =0). "Alex" wrote: I have 3 fields in a query and in a report: Aug, FAug, and AugP. In the query AugP is being calculated as follows: =IIf(nz([FAug])0,nz([Aug])/nz([FAug]),IIf(nz([Aug])0,1,0)). So, if Aug 0 and FAug = 0 or Null it should be 1 (or 100%). The query shows it correctly as 1. But, in the report it appears as 0 (0.00%). Even when I copy this formula in the report AugP field it's 0 anyway. Could anybody advise anything about how to fix it? Thanks |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New Record Update | Michelle | Using Forms | 5 | October 28th, 2004 07:59 AM |
How do I chart part of data but show all data in data table? | CAngel | Powerpoint | 2 | October 22nd, 2004 11:13 PM |
Images in a database | Franz | General Discussion | 10 | October 7th, 2004 09:35 AM |
How to create graphs in a monthly report where the base data can change | John Clarke | Charts and Charting | 3 | June 25th, 2004 02:22 AM |