Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a daily stock. The stock value is broken down to dimension material.
I would like to choose two different dates and the show the difference in stock.
It is working so far but when I have stock and the total stock is being delivered so the new stock is 0 then I am getting a "-" and no changes "-" and I need the stock so show 0 and the changes -XX.
What I have (red):
What I need (green):
Set analysis:
sum(aggr(Sum([pob development quantity])
-
above(sum([pob development quantity]),1),material,[POB date]))
Thanks for the help.
Best regards,
Joanna
Then the issue is probably the latter option I mentioned, where there is no row in the data for the combination 3005011 / 20.12.2021 and as a result the aggr() can't be calculated. Assuming the aggr() is required to behave as is, you could try stuffing the data with 0 values for any missing combinations - depending on the data structure this may or may not be feasible.
You could try using:
sum(aggr(RangeSum(Sum([pob development quantity])
,
above(sum([pob development quantity]),1)),material,[POB date]))
Which would prevent null results when the Above() section is a null. However, this won't solve the problem if the issue is that there is no row for this material / POB date combination, because those are your aggr() fields.
Thanks for the input. I tried with Rangesum but unfortunately, it is not working either. Neither does Alt(X,0). Neither does isnull() nor if(isnull()).
Then the issue is probably the latter option I mentioned, where there is no row in the data for the combination 3005011 / 20.12.2021 and as a result the aggr() can't be calculated. Assuming the aggr() is required to behave as is, you could try stuffing the data with 0 values for any missing combinations - depending on the data structure this may or may not be feasible.
Thanks for your help. It looks like this is the issue. I will try to fill the missing data with 0. BR, Joanna