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
- :
- How to remove control charts with empty columns

- 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

Mar 13, 2020 8:46 AM
(280 views)

I have a large data table that I allow the user to filter down to a product to then create a subset and control charts. Products use different combinations of parameters so the main table and subset have empty columns that differ for each product. I would like to solve one of these problems:

- How can I create a dynamic list to feed into the control chart builder to only plot the parameters that are not empty for a given subset?
- How can I remove empty charts from the control chart builder after creation?

As an example, I have attached a subset of the Hot Dogs table with some parameters removed by Taste. Calories now has no data for all dogs with a Medium taste. In this instance, I would like to have every parameter plot but Calories, though it may be a different parameter for other Tastes.

Thanks!

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

Here is one way to handle the issue. Just check to see if the column has all missing values, and if so, then do not include it into the list of good columns.

```
Names Default To Here( 1 );
dt = Current Data Table();
colNames = dt << get column names( string, continuous );
newcolNames = ":Name(\!"" || colNames[1] || "\!")";
For( i = 2, i <= N Items( colNames ), i++,
If( Col Number( Column( colNames[i] ) ) != 0,
newcolNames = newcolNames || ",:Name(\!"" || colNames[i] || "\!")"
)
);
Eval(
Parse(
"Control Chart Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Show Capability( 0 ),
Variables(
Y("
|| newcolNames || ")));"
)
);
```

Jim

1 REPLY 1

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

Here is one way to handle the issue. Just check to see if the column has all missing values, and if so, then do not include it into the list of good columns.

```
Names Default To Here( 1 );
dt = Current Data Table();
colNames = dt << get column names( string, continuous );
newcolNames = ":Name(\!"" || colNames[1] || "\!")";
For( i = 2, i <= N Items( colNames ), i++,
If( Col Number( Column( colNames[i] ) ) != 0,
newcolNames = newcolNames || ",:Name(\!"" || colNames[i] || "\!")"
)
);
Eval(
Parse(
"Control Chart Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Show Capability( 0 ),
Variables(
Y("
|| newcolNames || ")));"
)
);
```

Jim