Subscribe Bookmark RSS Feed

JMP10: Col Max() and Col Min() functions returned the data from excluded row

pichan_p

Community Trekker

Joined:

Dec 11, 2014

Hello,

I used Col Max() and Col Min() function to return the Max/Min value of my specific columns.

Somehow I disabled the unwanted rows but the Col Max() and Col Min() still returned those excluded value.

Is this normal? Do you guys have any idea?

Thank you so much

Pichan

3 REPLIES
ms

Super User

Joined:

Jun 23, 2011

This is normal (see explanation on e.g. page 351 in the Scripting Guide).

Col Max() etc. support optional grouping arguments. In a column formula, this trick should work to force exclusion of excluded rows:

Col Maximum( :data, Excluded() )

glenn_maxey0

Community Trekker

Joined:

Sep 23, 2015

Sorry to be late to the discussion. Thank you for letting us lurkers know about the additional optional argument to Col Maximum( :data, Excluded() ).

If the JMP people are monitoring this, let this be known that the API (application programmer interface) should document all possible arguments to functions.

When I use the following code:

myYCol = "My Exposed Column Name";

myYMax = col max(column(myYCol));

print("Max:", myYMax);

myYMax = col max(column(myYCol), Excluded());

print("Max:", myYMax);

The first debug print will output a number, but could be a maximum specified in excluded rows.

The second debut print will output without quotes "." (period). Why?

When myYMax is later re-used in a "SendToReport... Dispatch... ScaleBox {Max( myYMax ), ...", it seems to employ the expected non-excluded maximum value in rendering of the graph.

ms

Super User

Joined:

Jun 23, 2011

The optional By-arguments in ColMax() etc. is only useful in column formulas.

In a script context you can use summarize() instead. In contrast to the ColStat functions excluded rows are not included in the calculations.

myYCol = "My Exposed Column Name";

Summarize(myYMax = Max(Column(myYCol)));

Print("Max:", myYMax);