=sum(iif([company],yes,[TripCost]))

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kenmn
    New Member
    • May 2015
    • 2

    #1

    =sum(iif([company],yes,[TripCost]))

    If yes then sum total of all trip costs for that category.

    On the form is millage start, millage end, 4 tick boxes one for each category.

    total millage

    Trip cost (millage x 40)

    Not getting the desired result for some reason despite trying several permutations
    Last edited by kenmn; May 26 '15, 04:32 PM. Reason: Miss the the reason for question
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    #2
    Try replacing Yes with True.

    Comment

    • Rabbit
      Recognized Expert MVP
      • Jan 2007
      • 12517

      #3
      Your expression doesn't make any sense, basically what you're doing is:
      Code:
      if company
         then yes
      if not company
         then tripcost

      Comment

      • kenmn
        New Member
        • May 2015
        • 2

        #4
        Thank you for your reply I kind of guessed it was something like that. The problem I have is what to change. I basically want the expression to total where 'yes' is ticked. Can you help?

        Comment

        • Rabbit
          Recognized Expert MVP
          • Jan 2007
          • 12517

          #5
          What you want to change is that if company is yes/true, then return the trip cost, otherwise return 0.

          Comment

          Working...