How to subtract 2 field in an Access Report?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yosiro
    New Member
    • Aug 2012
    • 34

    How to subtract 2 field in an Access Report?

    How to subtract 2 field in report like the picture below? The Access just have some option like sum, average, min, max, etc, but not subtract.
    Attached Files
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    It doesn't look like you're subtracting two fields but two rows. From the picture, it looks like for each Nama, there are two ids, 1 and 2. And your goal is to subtract id 2 from id 1. You can do this by grouping by nama, returning a negative for those that have id 2, and putting a subtotal on the grouping.

    Comment

    • yosiro
      New Member
      • Aug 2012
      • 34

      #3
      Yes you right, but how to return a negative for those that have id 2?

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        You can use the iif function for that.

        Comment

        Working...