
Re: Which AGGR to use?
Marcus Sommer Jun 16, 2017 8:23 AM (in response to Phil Speight)I'm not sure that I could explain it very well and therefore I suggest to look on the following postings:
In short: Aggr(Sum ......) will be used within calculated dimensions and Sum(Aggr(Sum .......) within expressions.
 Marcus

Re: Which AGGR to use?
Sunny Talwar Jun 16, 2017 8:23 AM (in response to Phil Speight)When you are using Aggr(Sum(....), the assumption is that there is only one value available after the inner Sum() is completed and that one value will be displayed. If for any reasons, there are more than one values, you will see  (null). Aggr(Sum(...) can be written like this Only(Aggr(Sum(....)) as they essentially mean the same exact thing.
Now Sum(Aggr(Sum(...)) is saying that if you have multiple values, then the expression should Sum those values and display it.
Here is an example for you to look at
I wanted to sum those rows where Dim2 began with D.... Since there are two such rows, the one without Sum() gave me null. Where as the one with Sum() gave me the right sum.
Does this make sense?

264340.qvw 151.0 K
