Report and Sum function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MNNovice
    Contributor
    • Aug 2008
    • 418

    Report and Sum function

    This is rather frustrating for me. In one report I have a total figure that sums two other figures.

    ([Budget]) + ([Change])

    then, I have Sum([Budget]) +Sum([Change])

    In one report the second formula works fine. But in the other formula it gives a very high number which is incorrect and I don't know why. Even though the first one is working correctly in both the reports.

    Can someone explain? and/or help? thanks.
  • Denburt
    Recognized Expert Top Contributor
    • Mar 2007
    • 1356

    #2
    You could add a field Sum([Budget]) and a field for Sum([Change]) and it may reveal a bit more information on why it could be failing. you might also try Sum([Budget]+[Change]) and see if that resolves your issue although essentially I would think that under most circumstances you should arrive at the same result.

    Are you using this with any running sums?

    Comment

    • MNNovice
      Contributor
      • Aug 2008
      • 418

      #3
      [Budget] = field
      [Change] = field
      [Budget] + [Change] = Total

      Sum([Budget]+[Change]) = Grand Total

      There are no running sums involved. The funny thing is that in one report (which is based on some tables), the formula works just fine. But the report I am working on now, is based on queries. May be that has something to do with the erroneous results. Now I am trying to learn how to do formula in a query. Not having much luck there - but I am trying.

      Thanks.

      Comment

      • ChipR
        Recognized Expert Top Contributor
        • Jul 2008
        • 1289

        #4
        I have never been able to combine totals, instead I have used something like:
        txtSumOfBudget = Sum([Budget])
        txtSumOfChange = Sum([Change])
        txtGrandTotal = [txtSumOfBudget] + [txtSumOfChange]

        Comment

        • Denburt
          Recognized Expert Top Contributor
          • Mar 2007
          • 1356

          #5
          Using tables or queries on a report should still yield the same results. Did you try adding a field for summing each individually then you can add the figures and see if each field is achieving the results it should? That will probably give you some more insight into the problem.

          Comment

          • MNNovice
            Contributor
            • Aug 2008
            • 418

            #6
            ChipR & Denburt
            My problem has been why it would work on one and not the other? I am yet to figure it out. Thanks for your suggestions and tips.

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32633

              #7
              Originally posted by MNNovice
              ChipR & Denburt
              My problem has been why it would work on one and not the other? I am yet to figure it out. Thanks for your suggestions and tips.
              That's not something we can really know without seeing the two items M.

              We can guess, but as you've not actually told us of any differences (other than tables versus queries, which as Den says is no real difference) there's little we can do I'm afraid.

              Comment

              Working...