20 Replies Latest reply: Sep 5, 2017 4:16 AM by Rohit Kumar RSS

    Sum(A) + Sum(B) or Sum(A+B)

    Thomas Karner



      a quick one, where I´m uncertain:


      I simply want to sum up two fields inculding (same) set analysis. Normally I do it in this way:


      sum( {<[Date.Cal.Year]={2017}>} [FieldA]) + sum( {<[Date.Cal.Year]={2017}>} [FieldB])


      Now I saw that this also works:

      sum( {<[Date.Cal.Year]={2017}>} ([FieldA] + [FieldB]))


      FieldA and FieldB are both from the same (facts) table.


      Due to I have a very large data set and complex nested formulas I´d prefer the second version, but I´m uncertain if there could be any differences in the result.


      Can anybody confirm whether the two versions are identical or otherwise outline the difference?


      Thanks, Thomas