Focal Point
[SOLVED] Rows in to Column

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

September 15, 2014, 12:00 PM
WFDevConsultant
[SOLVED] Rows in to Column
Hi,

I know there are many posting related to this and there are couple of ways we can get this done. What I want to know is, what is the best suggestion to get this work dynamically?

Sample data:
ORIGINAL:
BMW 50000 53000
TOYOTA 20000 23000

REQUIRED OUTPUT
BMW TOYOTA
RETAIL COST 50000 20000
DEALER COST 53000 23000

I am using

TABLE FILE CAR
SUM RETAIL_COST DEALER_COST
ACROSS CAR
WHERE CAR EQ 'BMW' OR 'TOYOTA'
ON TABLE HOLD AS TAB1
END

TABLE FILE TAB1
PRINT
E01 E02 E03 OVER
E04 E05 E06
END
-EXIT

What is the simplest way to get this?

Thanks in advance.

This message has been edited. Last edited by: <Kathryn Henning>,


8.2.06
Windows, All Formats
September 15, 2014, 12:05 PM
Tony A
Is this what you want?

TABLE FILE CAR
 SUM RETAIL_COST AS 'Retail Cost'
OVER DEALER_COST AS 'Dealer Cost'
ACROSS CAR       AS ''
WHERE CAR EQ 'BMW' OR 'TOYOTA'
ON TABLE SET PAGE NOLEAD
END


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10