Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following expression:
=FirstSortedValue(PartStockEnd, -Date)
It gives me the following results: (with PartStockEnd as a value, which is the stock at the end of that month)
Month | Article 1 | Article 2 | Article 3 | Article 4 | Article 5 |
---|---|---|---|---|---|
jan | 21 | 33 | 12 | 63 | 36 |
feb | 14 | 27 | 35 | 51 | 32 |
mrt | 12 | 25 | 70 | 0 | 20 |
apr | 77 | 0 | 28 | 38 | 45 |
may | 0 | 0 | 114 | 35 | 60 |
jun | 70 | 20 | 111 | 34 | 38 |
Which is correct. I can display this and a chart and everything is fine.
But now I want to have a sum of the stock for each month, so I can see the total stock over the last months. How can I accomplish this?
You are using a pivot table with two dimension Month and Article, right?
Try
=sum(aggr( FirstSortedValue( PartStockEnd, -Date) , Month, Article))
and enable appropriate partial sum for your dimension in presentation tab.
You are using a pivot table with two dimension Month and Article, right?
Try
=sum(aggr( FirstSortedValue( PartStockEnd, -Date) , Month, Article))
and enable appropriate partial sum for your dimension in presentation tab.
Thanks mate! This worked for me!
Can you please explain what this aggr() in combination with those 3 values does? Cause i know it works, but I dont know how