- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
formula
Hello everyone,
I have a simple question for you, I would like to build the following query using formulas in JMP if possible:
Put in the "error" column the value 1 one line after a cell in the "balance" column is non-zero.
Here is the database:
Line 38,061 should have the value in the "balance sheet" column be 1 and line 38,060 not.
Thank you for your answers !
This post originally written in French and has been translated for your convenience. When you reply, it will also be translated back to French .
2 ACCEPTED SOLUTIONS
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: formule
Using Lag() (and possibly check for first row) should be enough here.
Names Default To Here(1);
dt = New Table("Untitled 5",
Add Rows(3),
Compress File When Saved(1),
New Column("Column 1", Character, "Nominal", Set Values({"", "aaa", ""}))
);
dt << New Column("Col", Numeric, Nominal, Formula(
Row() != 1 & !IsMissing(Lag(:Column 1, 1))
));
-Jarmo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: formule
Jarmo's formula works fine, but it can be simplified to
If( Is Missing( Lag( :Bilan ) ) == 0,
1,
0
)
which will increase the runtime efficiency
Jim
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: formule
Using Lag() (and possibly check for first row) should be enough here.
Names Default To Here(1);
dt = New Table("Untitled 5",
Add Rows(3),
Compress File When Saved(1),
New Column("Column 1", Character, "Nominal", Set Values({"", "aaa", ""}))
);
dt << New Column("Col", Numeric, Nominal, Formula(
Row() != 1 & !IsMissing(Lag(:Column 1, 1))
));
-Jarmo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: formule
Jarmo's formula works fine, but it can be simplified to
If( Is Missing( Lag( :Bilan ) ) == 0,
1,
0
)
which will increase the runtime efficiency
Jim