Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm running into an issue with an expression I am trying to complete.
So I have 2 expressions:
1: number of items
2: number of planned items
I would like to check whether my first expression is bigger than my second one and if that's the case, I would like to take the lowest value.
If I use an expression (=if(column(1) <= column(2), column(1), column(2)) on customer level my table looks fine, but the total should just take the values on customer level and sum those.
I've tried using Aggr(), but that's not working for me. Is there anyone that can help me?
The pivot table looks as follows with customer selected:
Product | Customer | Number of items | Number of planned items | wished output | Actual output |
---|---|---|---|---|---|
A | A | 0 | 6 | 0 | 0 |
A | B | 2 | 6 | 2 | 2 |
B | A | 3 | 6 | 3 | 3 |
C | C | 8 | 6 | 6 | 6 |
C | D | 2 | 6 | 2 | 2 |
C | E | 5 | 6 | 5 | 5 |
Total | Total | 20 | 36 | 18 | 20 |
Thanks!
Try it with:
sum(aggr(rangemin(column(1), column(2)), Product, Customer))
- Marcus