Sorry, Based on the scenario, we need to calculate no of charge events for each BIN.
I need to consider BIN, Look_up_code & Power together.
For each Bin, we need to consider "Look_up_code" & "Power" columns. Look_up_code contains values like CHARGE_BEGIN_ALERT, CSOC_FULL_ALERT, PLUG_CHANGE_ALERT & CHARGE_PAUSE_ALERT.
"Power" contain numeric values.
For each Bin:
1. If Power > 60 sec between CHARGE_BEGIN_ALERT and CSOC_FULL_ALERT so it is endpoint. I get one charge event for a BIN.
2. If power < 60 sec between CHARGE_BEGIN_ALERT and CSOC_FULL_ALERT then check PLUG CHANGE also < 60sec then we need to check CHARGE PAUSE, also <60 then CHARGE_BEGIN_ALERT should be eliminated.
Is it possible to include this scenario with the logic.
Thank You !
Best Regards
Sandeep