Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to have in the field [RES1] the value under.
NbreTA et NbreT are an expression
7 = sum (ALCL + SOCO) = 3 + 4
I don’t know, if it’s possible to have an expression like that or maybe an another method.
RES1 = Sum field [NbreT] if CAM=ALCL + (CAM=SOCO and CAM=OKI) and if LOC is not null
ZP | Nbre TA | Nbre T | CAM | LOC | RES1 |
ZP | 2 | 3 | ALCL | - | 7 |
ZP | 3 | 4 | SOCO | SOCO | 0 |
ZP | 5 | 9 | SOCO | - | 9 |
| 10 | 16 |
|
| 16 |
Try this as expression:
If(CAM = 'ALCL', NT + Below(total NT),if(CAM = 'SOCO' and LOC = '',NT,0)) or
If(CAM = 'ALCL', NT + Below(total NT),if(CAM = 'SOCO' and isnull(LOC),NT,0))
What does NT? It's NbreT no?
I try this expression
If(CAM = 'ALCL', NbreT + Below(total NbreT),if(CAM = 'SOCO' and LOC = '',NbreT,0)) or
If(CAM = 'ALCL', NbreT + Below(total NbreT),if(CAM = 'SOCO' and isnull(LOC),NbreT,0))
The value returns are false
-1
0
-1
Yes NT means NbreT no. I just tried to replicate your data. Can you please see the attached file. It gives me expected results.
Thanks,
Angad
Hello,
I add some value in your example.
ZP | NT | CAM | LOC | If(CAM = 'ALCL', NT + Below(total NT),if(CAM = 'SOCO' and LOC = '',NT,0)) |
0 | ||||
ZP | 3 | ALCL | 7 | |
ZP | 4 | SOCO | SOCO | 0 |
ZP | 9 | SOCO | 9 | |
ZP | 11 | OKI | OKI | 0 |
Try to explain if CAM = ALCL and LOC=SOCO + OKI we must to do the sum 3 + 4 + 11 = 18 the other value not change.
I want to have in new column
ZP | NT | CAM | LOC | RES1 |
27 | ||||
ZP | 3 | ALCL | 18 | |
ZP | 4 | SOCO | SOCO | 0 |
ZP | 9 | SOCO | 9 | |
ZP | 11 | OKI | OKI | 0 |
You need to play with the If statements, since your requirement is very specific. I think you would have to make nested IF conditions to achieve this.
Hope that helps you