November 24, 2006, 03:15 AM
ChabiOLAP DIMENSIONS TIPS (NEWBEE)
Hi all,
I need to create an OLAP report and i need help regarding how the olap dimensions relate to the columns being displayed.
November 24, 2006, 03:37 AM
AdityaThe OLAP Dimension basically allows you to filter the data depending on the fields you specify.
e.g
OLAP DIMENSIONS
location: world,country,region;
END
will allow you to filter the data on world,then on a country and then region(individually or combination).Once you write the above code in your fex file your OLAP control panel's Dimensions Tab will show you the fields world,country,region where you can specify the value for each for filtering.
Regards,
Aditya
November 24, 2006, 04:06 AM
ChabiThanks, I tried a simple olap report. The problem arises when i sort a column and then drilldown, I get no records. Please help
November 24, 2006, 04:13 AM
Adityacan you post your code?
Regards,
Aditya
November 24, 2006, 04:21 AM
Chabi-OLAP ON
OLAP DIMENSIONS
-*DIMENSIONS FILE HOLDDCUT1
PARCEL: PARCEL_YEAR, BOX_GROUP, SALESBOX, NEW_SIZE_DSC;
VALN: VALN, DOC, DOCDSC, POT, POTDSC, NEW_SIZE_DSC;
SIZE: NEW_SIZE_GRP, NEW_SIZE_DSC;
END
TABLE FILE HOLDDCUT1
SUM CARAT
VALUE
AND COMPUTE AVP/P14.2S=VALUE/CARAT;
PCTCTS AS '% DOC'
BY PARCEL_YEAR
BY VALN
BY NEW_SIZE_GRP NOPRINT
BY NEW_SIZE_DSC
ON TABLE SUMMARIZE
ON VALN RECOMPUTE CARATS AVP VALUE AS '*VALN TOTAL:'
ON TABLE SET PAGE-NUM OFF
ON TABLE SET ONLINE-FMT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET AUTODRILL ON
ON TABLE SET OLAPPANE TOP
ON TABLE SET STYLE *
November 24, 2006, 06:05 AM
AdityaI am not sure how much this will help.But you can try a hold on your table -
e.g.
select query;
TABLE FILE SQLOUT
PRINT
*
ON TABLE HOLD AS HOLD2
END
and before this just FILEDEF your hold file.so your entire code will look like this -
==============================
APP PATH BASEAPP yourparentfoldername
-RUN
FILEDEF HOLD2 DISK HOLD2.FTM (APPEND
-RUN
ENGINE DB2 SET DEFAULT_CONNECTION databasename
SQL DB2
your sql query here if u are using one;
APP HOLDMETA yourparentfoldername
APP HOLDDATA yourparentfoldername
TABLE FILE SQLOUT
PRINT
*
ON TABLE HOLD AS HOLD2
END
TABLE FILE HOLD2
PRINT *
ON TABLE HOLD FORMAT FOCUS AS DDD
END
TABLE FILE DDD
PRINT *
ON TABLE HOLD FORMAT FOCUS AS HABC
END
-RUN
APP HABC BASEAPP/HABC.FTM
-OLAP ON
OLAP DIMENSIONS
your dimensions here
END
TABLE FILE HABC
PRINT *
ON TABLE SET AUTODRILL ON
END