If Statement with Lag Function<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hello all,
I am trying to utilize the If statement and a Lag function, but I can't seem to get the coding right.
As it appears right now I have:
If(:DF == 2, :SS / : DF)
and
If(:DF == 7, :SS / : DF)
I want to utilize both formulas in the same column and I was told the Lag function can help. However, I am unsure as to where this needs to be placed in the script and how to properly insert it.
I had to put a space between : and D because it kept making it an emoji in the chat box and I'm unsure as to how to stop that.
Can anyone help?
Re: If Statement with Lag Functionthe question is not clear. can you please give an example with a table?
Re: If Statement with Lag FunctionThat actually answered what I was looking for, but has raised a new question, which clarifies the use of the lag function I believe.
Trying to now take the value associated with DF == 2 and divide it by the value associated with DF == 7.
Re: If Statement with Lag Functionhi,
i am not sure where the lag function is supposed to come in.
if you want to put both conditions as one function try this:
If(:DF == 2 | :DF == 7, :SS / :DF, Empty())
alternatively, you can write this using the Match function:
Mathc(:DF, 2, 7, :SS / :DF, Empty())
if this doesn't help please give more details,
ron