Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Oct 2013
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Quick help - Conditional Statement bracketting??

    Hi, I am trying to build a conditional statement which says, If [Project] =1, return the sum of [TimeSpent], else Null , but am knitting parenthesis and commas and can't get it to work.... I've been trying

    IIF(([project]= 1),SUM[time spent],NULL) and variations of brackets - it will not work... help!

    thanks :-)

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts
    I believe what you want is
    IIF([project]=1,SUM([time spent]),NULL)
    A general rule of thumb - field names need to have brackets around them (especially if they contain spaces, otherwise access figures that out in most cases) and functions need to have an opening and a closing parenthesis.
    Wendell

  3. #3
    New Lounger
    Join Date
    Oct 2013
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Wendell - i got there eventually! :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •