Focal Point
Limit Display of Across Columns but include all records

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

January 15, 2008, 11:01 AM
Tim J
Limit Display of Across Columns but include all records
I have a report that list Customers and places an 'X' in an Across Column under each Order Type this customer uses.

To show an example, using the CAR file, this report will show each COUNTRY and what BODYTYPE it makes:

DEFINE FILE CAR
BODY_X/A1 = IF CAR.BODY.BODYTYPE EQ CAR.BODY.BODYTYPE THEN 'X' ELSE '';
END

TABLE FILE CAR
SUM BODY_X
BY CAR.ORIGIN.COUNTRY
ACROSS CAR.BODY.BODYTYPE
ON TABLE SET HTMLCSS ON
ON TABLE NOTOTAL
END


What I need, still using the CAR file as an example, is to only include some of the Across Values (ex. ACROSS CAR.BODY.BODYTYPE COLUMNS COUPE AND HARDTOP AND ROADSTER).

When I do this, it only shows the Countries that make those body types. Even though FRANCE, W GERMANY and JAPAN do not make one of those BODYTYPES, I would still like to display a country record, but an 'X' would not appear under any of the columns.

Any help would be appreciated!

Thanks,
Tim J
January 15, 2008, 01:32 PM
GinnyJakes
This is really kludgy but ...

Run your fex and hold the output in a Focus file, index COUNTRY. Run another query just to get the countries. Join together with SET ALL=ON.

I'm sure someone else has a more clever idea.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
January 16, 2008, 03:31 AM
Alan B
Another (kludgy) take on this is:
APP HOLD myApp
SET ASNAMES=ON
DEFINE FILE CAR
BODY_X/A20 = IF CAR.BODY.BODYTYPE EQ CAR.BODY.BODYTYPE THEN CAR.BODY.BODYTYPE ELSE '';
END

TABLE FILE CAR
SUM BODY_X
BY CAR.ORIGIN.COUNTRY
ACROSS CAR.BODY.BODYTYPE
ON TABLE HOLD
END

TABLE FILE HOLD
SUM 
COMPUTE COUPE/A1 = IF BODCOUPE NE ' ' THEN 'X' ELSE ' ';
COMPUTE HARDTOP/A1 = IF BODHARDTOP NE ' ' THEN 'X' ELSE ' ';
COMPUTE ROADSTER/A1 = IF BODROADSTER NE ' ' THEN 'X' ELSE ' ';
BY COUNTRY
ON TABLE SET HTMLCSS ON
ON TABLE NOTOTAL
END



Alan.
WF 7.705/8.007
January 16, 2008, 05:06 AM
GamP
And yet another, maybe even more clumsy, approach might be touse the BY ROWS OVER tactic.
Example with the car database:
DEFINE FILE CAR
BODY_X/A1 = IF CAR.BODY.BODYTYPE EQ CAR.BODY.BODYTYPE THEN 'X' ELSE '';
END

TABLE FILE CAR
SUM BODY_X
BY CAR.ORIGIN.COUNTRY ROWS 'ENGLAND' OVER 'FRANCE' OVER 'ITALY' OVER 'JAPAN' OVER 'W GERMANY'
ACROSS CAR.BODY.BODYTYPE COLUMNS COUPE AND HARDTOP AND ROADSTER
ON TABLE SET HTMLCSS ON
ON TABLE NOTOTAL
END

Hope this helps...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
January 23, 2008, 11:41 AM
Tim J
Ginny, Alan and GamP. Thank you for your suggestions! These do the trick (kludgy or not!).

Thank You!

Tim J