Hey,
I want to assign the starting value of my loop to a scalar. The starting value depends on two things:
1. Which row has the xth value of a certain variable (I use "sum" in order to get information on the start of the series).
2. Which row belongs to a certain date (here I use "su" in order to get that information).
Whichever of these two rows is "later" in the series I want to use as starting value.
I tried the following ("sstart" contains the information of condition 1, "r(min)" the information of condition 2):
which leads to "invalid syntax"
and
which leads to "if not allowed".
I hope my problem is clear. Thanks in advance!
Best,
Thomas
I want to assign the starting value of my loop to a scalar. The starting value depends on two things:
1. Which row has the xth value of a certain variable (I use "sum" in order to get information on the start of the series).
2. Which row belongs to a certain date (here I use "su" in order to get that information).
Whichever of these two rows is "later" in the series I want to use as starting value.
I tried the following ("sstart" contains the information of condition 1, "r(min)" the information of condition 2):
if r(min) > sstart {
scalar drop sstart
scalar sstart = r(min)
}
scalar drop sstart
scalar sstart = r(min)
}
and
scalar sstart2 = r(min) if (r(min) > sstart)
I hope my problem is clear. Thanks in advance!
Best,
Thomas
Comment