turn on suggestions

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

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- function for room number by floor

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Sep 25, 2012 10:02 AM
(2129 views)

In a data table, I have a column of room numbers, such as 103, 104, 208, 307, 409, 502, 604, 608. I would like to create a new column of floor for each value such as 1, 2, 2, 4, 5, 6, 6. I am not sure how to use the function option for this task. Can someone help with this?

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Sep 25, 2012 10:30 AM
(4094 views)

Solution

Looks like your column is a character, so change the formula to:

floor(num(:room) / 100)

4 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Sep 25, 2012 10:06 AM
(2047 views)

Is the first digit the floor, this will work for rooms such as 1202 as well that are on the 12th floor.

you can do the following

floor(room/100);

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Sep 25, 2012 10:20 AM
(2047 views)

Thank you. get the following result. Can you tell me if you have seen this and what it may mean?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Sep 25, 2012 10:30 AM
(4095 views)

Solution

Looks like your column is a character, so change the formula to:

floor(num(:room) / 100)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Sep 25, 2012 10:08 AM
(2047 views)

Sorry I meant that the result would be 1, 1, 2, 3, 4, 5, 6, 6. Essentially the 1st digits.