Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I want to sum up the scrap from all the orders that have gone through all the operations.
I have tried as follows:
sum(aggr(max({<OP= {'40'}, Status = {'True'}>} Scrap), Order))
so I only get the one row of data where the condition is true. But I want to know the order ID where the last operation is true and then add up the column scrap.
does anyone have an idea of how to do this?
thanks a lot in advance!
Order | OP | Good | Scrap | Status |
1 | 10 | 100 | 0 | True |
20 | 100 | 0 | True | |
30 | 90 | 10 | True | |
40 | 90 | 0 | True | |
2 | 10 | 70 | 0 | True |
20 | 60 | 10 | True | |
30 | 60 | 0 | True | |
40 | 50 | 10 | False |
the solution would be 10. because only order 1 is finished yet.
Hi,
If I understood correctly, one solution :
=Sum({<Order={"=Match(right(concat(OP&Status,''),6),'40True')>0"}>} Scrap)
output :
HI @Taoufiq_Zarra ,
thank you for your fast reply!
when I implement this formula it only evaluates the data series where this condition is true. but I need the sum over the whole column scrap.
thanks again!
try this
sum({<Order = p({1<OP={'40'},Status={'True'}>}Order)>}Scrap)