Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have :
Load
Code, code_ass, customer, duration, capital...
from ..TD.xlsx
I have this table:
Code | code_ass | Customer | Duration | |
---|---|---|---|---|
0001 | 123 | AmineX | 3 | |
0001 | 124 | AmineH | 3 | |
0002 | 125 | x1 | 3 | |
0002 | 126 | x1 | 4 | |
0003 | 127 | x2 | 5 | |
0004 | 128 | x3 | 2 |
I need to group by Code and calculate the number of code_ass ( NBR).
Then,
the goal is to indicate when Number of code_ass=2 and duration is equal for the both code_ass grouped by Code , '1' else '0'.
Exemple:
code=0001
NBR = 2
x= Duration of code_ass = 123 : 3
y= Duration of code_ass = 124 : 3
if x = y and NBR = 2 then '1' else '0'
Any help please?
Regards
May be this?
May be this?
Thanks a lot bro
Glad to know it worked