Focal Point
plotting null values on graph

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2871097331

August 25, 2004, 11:59 AM
<Thariq>
plotting null values on graph
Hi,
Please do provide a solution on this.How do we plot null values on to scatter graphs. have already tried with MISSING and GMISSING parameters. Gmissing is working only when we use 'SUM'. I need to 'PRINT' the passed fields directly on to the graph. I am getting " EDA/no data "when MISSING parameter applied to the graph. Here follows my code for reference.

DEFINE FILE GRAPH1
CST1/D20 MISSING ON=IF CUSTOMER EQ 'A' THEN PRICE ELSE MISSING ;
CST2/D20 MISSING ON=IF CUSTOMER EQ 'S' THEN PRICE ELSE MISSING;
CST3/D20 MISSING ON=IF CUSTOMER EQ 'D' THEN PRICE ELSE MISSING ;
END

SET LOOKGRAPH = SCATTER, GRID=ON
SET GTREND=ON
SET HAXIS=600, VAXIS=315,
SET GMISSVAL=MISSING
SET GMISSING=ON
GRAPH FILE GRAPH1
PRINT CST1 CST2 CST3
ACROSS VOLUME
ON TABLE SET ONLINE-FMT HTML
ON GRAPH SET GMISSING ON
ON GRAPH SET GRAPHSTYLE *

****STYE FOLLOWS****

ENDSTYLE
END


Help me out in reolving the issue.

Thanks!!!!
August 26, 2004, 03:52 PM
Larry Eiss
Thariq,

See the code below.

I'm using VZERO=OFF and it runs OK. Let me know if the output is not what you are looking for.

Larry

----------------Begin Code---------------
-* File MISSING.fex
DEFINE FILE CAR
CST1/D20 MISSING ON=IF COUNTRY EQ 'ENGLAND' THEN SALES ELSE MISSING ;
CST2/D20 MISSING ON=IF COUNTRY EQ 'FRANCE' THEN SALES ELSE MISSING;
CST3/D20 MISSING ON=IF COUNTRY EQ 'JAPAN' THEN SALES ELSE MISSING ;
END

GRAPH FILE CAR
ON GRAPH SET LOOKGRAPH SCATTER
ON GRAPH SET GRID ON
ON GRAPH SET GTREND ON
ON GRAPH SET HAXIS 600
ON GRAPH SET VAXIS 315
ON GRAPH SET 3D OFF

-* When VZERO is OFF MISSING values are not shown as Zero
ON GRAPH SET VZERO OFF

PRINT CST1 CST2 CST3
ACROSS RC

ON GRAPH SET GRAPHSTYLE *
ENDSTYLE
END
-----------END CODE---------------
August 31, 2004, 11:55 AM
<Thariq>
Hi Larry,

Thanks for your reply. But it is still showing the same 'EDA no/data' message. Attached is the code for reference.

SET SQLENGINE=SQLORA
SQL SQLORA
SELECT PRICE,VOLUME,CUSTOMER FROM TEST_TBL;
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS CAR FORMAT ALPHA
END
-RUN

DEFINE FILE CAR
CST1/D20 MISSING ON=IF CUSTOMER EQ 'A' THEN PRICE ELSE MISSING;
CST2/D20 MISSING ON=IF CUSTOMER EQ 'S' THEN PRICE ELSE MISSING;
CST3/D20 MISSING ON=IF CUSTOMER EQ 'D' THEN PRICE ELSE MISSING;
END

GRAPH FILE CAR
ON GRAPH SET LOOKGRAPH SCATTER
ON GRAPH SET GRID ON
ON GRAPH SET GTREND ON
ON GRAPH SET HAXIS 600
ON GRAPH SET VAXIS 315
ON GRAPH SET 3D OFF

-* When VZERO is OFF MISSING values are not shown as Zero
ON GRAPH SET VZERO OFF

PRINT CST1 CST2 CST3
ACROSS VOLUME

ON GRAPH SET GRAPHSTYLE *
ENDSTYLE
END

Here if I use 'SUM' instead of 'PRINT',it will show the output. But I want only 'PRINT'.
Please do let me know where I am going wrong.