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
- :
- Re: Formula for Number of Unique Categories in Col...

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

Wednesday
(121 views)

I am looking for the column formula to provide me with the count of unique categories in a column (maybe based on another columns categories). For instance, if a column has

A

A

B

B

B

C

then I would like to get back the value 3.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

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

Wednesday
(122 views)

Solution

Try this formula.......of course, swap out the :Flow for the column you want to count the categories for

```
Summarize( x = by( :FLOW ) );
N Items( x );
```

If the data table is really large, you may want to use this more efficient version

```
If( Row() == 1,
Summarize( x = by( :Flow ) );
y = N Items( x );
);
y;
```

Jim

3 REPLIES

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

Wednesday
(119 views)

I think I remember the Summation formula being used for this, but my memory fails me.

Highlighted
Solution

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

Wednesday
(123 views)

Try this formula.......of course, swap out the :Flow for the column you want to count the categories for

```
Summarize( x = by( :FLOW ) );
N Items( x );
```

If the data table is really large, you may want to use this more efficient version

```
If( Row() == 1,
Summarize( x = by( :Flow ) );
y = N Items( x );
);
y;
```

Jim

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

4 hours ago
(5 views)