Without using JSL, is there a way to calculate a column that tells you how many rows are left until an event happens?
The following formula works but needs the user to click n times in "Apply"

You could use more complicated formula. Something like this could work (might not handle all special cases correctly):
If(Row() == 1,
m_events = Loc(:Event << get as matrix, 1);
);
smallerRows = Loc(Row() <= m_events);
If(N Items(smallerRows) == 0,
0,
rowNextEvent = m_events[smallerRows[1]];
If(rowNextEvent,
rowNextEvent - Row();
);
);
</CODE></P><P> </P></LINGO-BODY><LINGO-SUB id="lingo-sub-420085" slang="en-US">Re: Number of rows until event</LINGO-SUB><LINGO-BODY id="lingo-body-420085" slang="en-US"><P>Maybe we can use is the fact that the solution, if the row order is reversed, is self populated in JMP?</P><P> </P><P><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="event reversed.png" style="width: 999px;"><IMG src="https://us.v-cdn.net/6038925/uploads/images/35991iD2492C320390E2C4/event%20reversed.png" role="button" title="event reversed.png" alt="event reversed.png" /></SPAN></P><P> </P><P>For example, this will reverse the order of the events.</P><P>Event reversed:</P><PRE><CODE class=" language-jsl">:Event[(N Rows() - Row()) + 1]
Now the values self-populate as the calculation works from top to bottom
n rows after the reversed event:
If( :Event inverted == 1, 0,
Lag( :n rows after inverted event, 1 ) + 1
)
Finally, we reversed that column.
:n rows after reversed event[(N Rows() - Row()) + 1]
Any ideas on how to do this in one formula which is easy to interpret?
At this point I will have to ask: what are we looking for here? Single formula which is also self-explanatory?
The formula I did provide is a single formula (will require small change to handle cases if there are no events after some specific point) but hardly self-explanatory, but can made closer to one by using supporting variables with good names.