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

- 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

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

Highlighted

- 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

Highlighted
##

- 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);

Highlighted
##

- 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

Created:
Sep 25, 2012 10:20 AM
| Last Modified: Oct 18, 2016 1:02 PM
(6893 views)
| Posted in reply to message from reeza 09-25-2012

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

Highlighted

- 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)

Highlighted
##

- 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.

Article Labels

There are no labels assigned to this post.