Subscribe Bookmark RSS Feed

Why do I get a chart IF no data ?

geof

Community Trekker

Joined:

May 29, 2013

Hi,

 

Using the Big Class jmp table as example ( attached)

 

Running the script below where I use a local filter :sex == "C" , I know "C" is missing , so No data.

 

Why do I get a chart with "all data" ?

Which condition should I add to have, If No data, No chart created ?

 

Thanks

geof

 

 

 

Graph Builder(
 Variables( X( :sex ) ),
 Elements( Bar( X, Legend( 3 ) ) ),
 Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "C" ) ) ),
 SendToReport( Dispatch( {}, "400", LegendBox, {Set Title( "" )} ) )
);

1 ACCEPTED SOLUTION

Accepted Solutions
geof

Community Trekker

Joined:

May 29, 2013

Solution

Thanks Jim

 

2 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

I assume the Local Data Filter is overridding what to it is an invalid Where clause.  To accomplish what you want, the below script will work:

Local Data Filter(
	Inverse( 1 ),
	Add Filter( columns( :sex ), Where( :sex == {"F", "M"} ) )
);
Jim
geof

Community Trekker

Joined:

May 29, 2013

Solution

Thanks Jim