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
- :
- Graph Builder Bar Graph filter by top 10 Sums

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

Highlighted
##

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

Graph Builder Bar Graph filter by top 10 Sums

Mar 13, 2019 10:37 AM
(468 views)

I have a horizontal stacked bar graph and want to limit it to just the top 10 sums by Y-axis category.

The data has a year's worth of customer orders. Each row is an order line item that has a customer, a value and a customer country (among other data). The x-axis is summary statistic sum of the order value. The y-axis is the customer name. And the stacking (overlay) is by the customer country.

My goal is to not show all 1,000 customers, but rather just the top 10 by the total of their order values.

The script at the moment looks like this, where sales org. is the customer country

```
Graph Builder(
Size( 905, 603 ),
Variables(
X( :Total Dollars Ordered ),
Y(
:Customer,
Order By( :Total Dollars Ordered, Ascending, Order Statistic( "Sum" ) )
),
Overlay( :Sales Organization Code )
),
Elements(
Bar( X, Y, Legend( 4 ), Bar Style( "Stacked" ), Summary Statistic( "Sum" ) )
),
SendToReport(
Dispatch(
{},
"graph title",
TextEditBox,
{Set Text( "Total Dollars Ordered by Customer" )}
)
)
)
```

.

2 REPLIES 2

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

Re: Graph Builder Bar Graph filter by top 10 Sums

You might create a new data column with the ranks. Then exclude and hide rows with ranks > 10.

Learn it once, use it forever!

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

Re: Graph Builder Bar Graph filter by top 10 Sums