- Topics: 32
- Replies: 1,654
- Posts: 1,686
This is all a little too complex for us to look at without a consult. (optuma.com/consults)
What I would suggest first is that you break it up into separate sections and make sure that each part is working as you expect.
One other thing to make it easier to read is that you can swap (Offset(BS, offset = 1) with BS
Also look at the TimeSinceSignal function (https://help.optuma.com/kb/faq.php?id=1030) using the offset allows you to see how many days between signals (which I think you are trying to do).
The other issue I see is that you are using the FollowThrough value before it has been set.
Hopefully, that will help you get going, if you need more help with this you’ll have to organise a consult with one of the guys.
All the best