Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm working with the following table:
The goal is to get the cumulative total number to match the sum of the actual Qty Shipped column. Is that possible? Here is the expression for the cumulative column:
Aggr(RangeSum(Above(sum(EquivalentQuantity),0,RowNo())),
(CommodityCode,(Numeric,Ascending),(Text(Ascending)),
(StartOfWeek), (Numeric, Ascending), (Text, Ascending)),
(ShipDate, (Numeric, Ascending), (Text, Ascending)))
Marcus,
It looks like my edited comment didn't get saved last night. I tried with Total as well and got the same results. However, I did discover that there's a Modifier option that I overlooked before. Once I set that to Accumulation, I got the correct results but they are in reverse order. Note that the Modifier option created a new expression:
Aggr(RangeSum(Above(Total ( aggr(RangeSum(Above(sum(EquivalentQuantity),0,RowNo())),ShipDate,CommodityCode) ) , 0, 6)),
[$(=Replace(GetObjectField(1),']',']]'))], ([$(=Replace(GetObjectField(0),']',']]'))], (Numeric, Descending)))
I changed the sort to Ascending and got the correct results:
Did you try it without the aggr() stuff, just?
RangeSum(Above(sum(EquivalentQuantity),0,RowNo()))
Hi Marcus,
Here are the results when I remove the aggr():
I'm filtering on one week. My understanding is that the aggr() is needed, along with the dimension sorting, in order to get a cumulative total by week. Thanks.
It depends in regard to the used dimensions within the chart and the default-ordering of the object. Regarding to your first screenshot it looked that a normal cumulation-calculation might be usable. Before looking further add a TOTAL to the above and see if it changed the results.
The expression now looks like this:
RangeSum(Above(Total sum(EquivalentQuantity),0,RowNo()))
But the numbers look exactly the same as they did without the Total. I am currently filtering on a single week and a single CommodityCode; same as last scree shot.
The expression sum(EquivalentQuantity) is the same as QTY Shipped or is it different?
Yes, I'm just using a different label for the table column.
I wouldn't expect such behaviour by a "classical" data-structure - in data-model + object-design. Therefore I suggest to re-create the object from the scratch and step by step. At first with one dimension and the normal sum() + rangesum(above(sum())) without any further measures in regard to sorting, coloring and so on (regardless if fixed set or calculated) or alternate states and similar stuff.
It will exclude any possible corruption of the object and showing which measure leads to the seen behaviour. Just a guess - the cause may a calculated dimension ....
I started over and it still looks like it won't accumulate correctly. Just using the basics; I selected one commodity, LTC, and one week of data. There are no calculated dimensions. I changed the label for Shipped Qty so it reflects the name of the measure more precisely, so now it's labeled Equiv Qty. I tried with and without Total in the expression but I'm getting the same results:
Cumulative: RangeSum(Above(sum(EquivalentQuantity),0,RowNo()))
Please try it again with: RangeSum(Above(TOTAL sum(EquivalentQuantity),0,RowNo()))