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
- :
- 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
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Sep 25, 2012 10:02 AM
(5389 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?

1 ACCEPTED SOLUTION

Accepted Solutions

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

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

floor(num(:room) / 100)

4 REPLIES 4

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

Re: function for room number by floor

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
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: function for room number by floor

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
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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

floor(num(:room) / 100)

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

Re: function for room number by floor

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