From: kevcar40 on
hi i have a query that takes values from two other queries

rejectreason_baseweeklysum.sumof1 = number of repairs (entered daily)
rejectreason_baseweeklysum Query = producton (entered weekly)

1per: Sum((rejectreason_baseweeklysum.sumof1/
[rejectreason_baseweeklysum Query].wk1))

if rejectreason_baseweeklysum Query has not been enter 100% is
returned

what i would like to happen if this returns 100% i would like return
null

i tried the Iff

any ideas how i can achieve this

thanks

kevin
From: Salad on
kevcar40 wrote:

> hi i have a query that takes values from two other queries
>
> rejectreason_baseweeklysum.sumof1 = number of repairs (entered daily)
> rejectreason_baseweeklysum Query = producton (entered weekly)
>
> 1per: Sum((rejectreason_baseweeklysum.sumof1/
> [rejectreason_baseweeklysum Query].wk1))
>
> if rejectreason_baseweeklysum Query has not been enter 100% is
> returned
>
> what i would like to happen if this returns 100% i would like return
> null
>
> i tried the Iff
>
> any ideas how i can achieve this
>
> thanks
>
> kevin

Not sure I understand the question entirely. Does this get you started?
The following creates a column Lper. I used 0. Try using Null. No
need for continuation line breaks (_) in the query, done for reply.
lper : IIF([rejectreason_baseweeklysum Query].wk1 <> 100, _
Sum(rejectreason_baseweeklysum.sumof1/ _
[rejectreason_baseweeklysum Query].wk1,0)
From: Phil on
On 23/02/2010 20:35:31, Salad wrote:
> kevcar40 wrote:
>
>> hi i have a query that takes values from two other queries
>>
>> rejectreason_baseweeklysum.sumof1 = number of repairs (entered daily)
>> rejectreason_baseweeklysum Query = producton (entered weekly)
>>
>> 1per: Sum((rejectreason_baseweeklysum.sumof1/
>> [rejectreason_baseweeklysum Query].wk1))
>>
>> if rejectreason_baseweeklysum Query has not been enter 100% is
>> returned
>>
>> what i would like to happen if this returns 100% i would like return
>> null
>>
>> i tried the Iff
>>
>> any ideas how i can achieve this
>>
>> thanks
>>
>> kevin
>
> Not sure I understand the question entirely. Does this get you started?
> The following creates a column Lper. I used 0. Try using Null. No
> need for continuation line breaks (_) in the query, done for reply.
> lper : IIF([rejectreason_baseweeklysum Query].wk1 <> 100, _
> Sum(rejectreason_baseweeklysum.sumof1/ _
> [rejectreason_baseweeklysum Query].wk1,0)
>

Try
lper : IIF(Nz([rejectreason_baseweeklysum Query].wk1) >0, _
Sum(rejectreason_baseweeklysum.sumof1) ) / [rejectreason_baseweeklysum
Query].wk1,0)

Phil