What is the difference between SUM and +?

Hi!

Does anbody have an idea why the results of these two terms differ?

([Measures].[Days in transition status],
[Transition Status].[Open])
+
([Measures].[Days in transition status],
[Transition Status].[In Progress])

This adds up the days in transition time for the issues related.

Sum(
([Measures].[Days in transition status],
[Transition Status].[Open]),
([Measures].[Days in transition status],
[Transition Status].[In Progress])
)

While this results in the days of transition status “In Progress” only.

Hi @sven

The “+” operator would be the correct way to go in this scenario as the Sum() function expects two arguments- a set to iterate across, and the numeric expression that needs to be summed up for this set:
https://docs.eazybi.com/eazybi/analyze-and-visualize/calculated-measures-and-members/mdx-function-reference/sum

Since, in this case, both of these are tuples, then the first argument receives no set and sums up the second argument across all the issues.

Let me know if this makes sense or if you have any additional questions on this!

Cheers!
Nauris

Hey Nauris,

thanks for the very polite way to tell me I was misusing the SUM function… :rofl:

Best,
Sven

1 Like