From: kevcar40 on 23 Feb 2010 14:41 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 23 Feb 2010 15:35 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 24 Feb 2010 03:38 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
|
Pages: 1 Prev: Need to print an query in an array Next: Can I check if a user is pasting a record? |