Hi, I don't know where to post a question regarding Business Object. If this isn't the right place, please redirect me.
I'm trying to make a function / measure that sums the values of some operations based on the ID. This is my data sample:
| Transaction order number | Sale operation type | Operation amount |
| 1 | 41 | 0 |
| 1 | 20 | 5 |
| 2 | 20 | 5 |
| 3 | 20 | 5 |
"Transaction Order Number" is a unique identifier for every operation, "Sale operation Type" defines the type of the operation and "Operation amount" is self explanatory.
Basically I have to sum the Operation Amount for all the Transaction Order Number that contains the Sale operation type 41. In my case "Sale Operation type" can only be 20 or 41, so it shouldn't be so difficult. In this example the result of my variable should be 5.
I tried doing it in 2 different ways, but I end up with #MULTIVALUE in both of them.
1) = If ([Transaction order number] Where([Sale operation type] = 41) = [Transaction order number] Where([Sale operation type] = 20)) Then Sum([Operation amount]) Else 0
2) = Sum([Operation amount]) ForEach([Transaction order number]) Where(Count([Sale operation type]) > 1)
In 1) the idea is to check if I have the same Transaction order number for Sales operation type 41 and 20.
In 2) the idea is to sum the Operation amount if I find multiple Sale operation type for the same Transaction order Number
Is there a way to do this?
Thank you for your time
Request clarification before answering.
| User | Count |
|---|---|
| 14 | |
| 13 | |
| 7 | |
| 7 | |
| 5 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.