Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- JMP User Community
- :
- Discussions
- :
- save a table value and use it in a formula

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Nov 4, 2019 10:11 AM
(495 views)

Hi,

I need to grab a single value (baseline value) from a data table so I can use it in a formula to calculate a relative values.

I tried to use the the *get values where* functionality and save it as a variable. I don´t get an error but I don´t get an output either. What am I doing wrong?

col_dark = column(data table("splitsummary2"), "AUC dark phase absolute (ml/kg)") << Get Values Where(Column("Compound") == "Vehicle0mg/kg")

Br Julie

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

I have never heard of a function called "Get Values Where". What I think you are refering to is "Get Rows Where()". Below is a reworking of your code to what I think you want......

```
col_dark = :Name( "AUC dark phase absolute (ml/kg)" )[Data Table( "splitsummary2" ) <<
Get rows Where( :Compound == "Vehicle0mg/kg" )]
```

Jim

2 REPLIES 2

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

I have never heard of a function called "Get Values Where". What I think you are refering to is "Get Rows Where()". Below is a reworking of your code to what I think you want......

```
col_dark = :Name( "AUC dark phase absolute (ml/kg)" )[Data Table( "splitsummary2" ) <<
Get rows Where( :Compound == "Vehicle0mg/kg" )]
```

Jim

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: save a table value and use it in a formula

```
dt = Data Table("splitsummary2");
// Get values as matrix and use the loc command to get the locations where compound is equal to "Vehicle0mg/kg". (In my table it appears 3 times). These locations you can use as indices to gt the value(s) you need for further analysis.
m = Column( dt, "AUC dark phase absolute (ml/kg)" ) <<
Get as matrix();
c = Column( dt, "Compound" ) <<Get as Matrix();
col_dark = m[loc(c,"Vehicle0mg/kg")];
```

This should get you the value you need. [23330.7291666667]

Article Labels

There are no labels assigned to this post.