Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to get the negative margin of the credit note like in the table below.
Ordno | Artno | Sales | Margin |
---|---|---|---|
1234 | 1111 | 100 | 50 |
1234 | 1111 | -100 | -75 |
1234 | 2222 | 200 | 80 |
1234 | 2222 | -200 | -90 |
5678 | 1111 | 50 | 30 |
5678 | 2222 | 100 | 40 |
5678 | 3333 | 800 | 100 |
The outcome I want is the sum of the margin on orders where the sum of sales = 0 (so in this example Ordno 1234). The outcome in this case should be -35, but when I use Sum({<Sales={0}>} Margin) I get no result.
Can somebody help me?
Try this
Sum({<Ordno = {"=Sum(Sales) = 0"}>}Margin)
Hi Sunny,
No this doesn't work.
Working for me
yep, this expression is working as required.
=sum({<Ordno={"=Sum(Sales)=0"}>}Margin)