I'm creating a MAS file off a MSOLAP datasource with measures and dimensions to be used in an OLAP enabled report with drilldown on the dimensions. A OLAP report works alright coming off this MAS file until I try to use a DEFINE field in the MAS file. This DEFINE field is calculating a percentage. Once I drop that DEFINEd field into the report and run it I get back an error message saying: (FOC11207) ERROR IN THE QUERY: (FOC11265) A DEFINE OR WHERE TEST OSAT_PCT SHOULD NOT REFERENCE MEASURE Q Osat<br /> Total Part of MAS file:
TABLE FILE FACT_CUBE
SUM Q_OSAT_TOTAL<br />
Q_OSAT_COUNT
OSAT_PCT<br />BY
NATION_DISPLAY
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SET ONLINE-FMT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET AUTODRILL ON<br />
ON TABLE SET OLAPPANE TOP
ENDSTYLE<br />END
The whole point of this is that I'm trying to create a shared calculated field within the MAS file for other reports to use. This way DEFINEs of calculated fields won't have to be created or included into every report.This message has been edited. Last edited by: <Mabel>,
July 13, 2005, 10:05 PM
GCohen
I don't know why you are getting this error message, but the Define when used in this way will give you the wrong value. It is summing up the ratios. You need a COMPUTE to do this.
(In the next release the Master file will also store Computes.)
July 14, 2005, 05:17 PM
<kvn>
Hmm... but it's not giving me the wrong value. I've also tried going about it this way in the MAS file and I still recieve the same error message.
FIELDNAME=OSAT_PCT,
ALIAS=OSAT_PCT, USAGE=D16.12,
ACTUAL=D8, MISSING=ON,
TITLE='OSAT_PCT', REFERENCE='((SUM.Q_OSAT_COUNT / SUM.Q_OSAT_TOTAL) * 100)', P
ROPERTY=CALCULATED MEASURE, $
FIELDNAME=Q_OSAT_COUNT,
ALIAS='Q Osat Count',
USAGE=D18.2, ACTUAL=D8,
MISSING=ON,
TITLE='Q Osat Count',
REFERENCE=SUM.Q_OSAT_COUNT,
PROPERTY=MEASURE, $
FIELDNAME=Q_OSAT_TOTAL,
ALIAS='Q Osat Total',
USAGE=D18.2,
ACTUAL=D8,
MISSING=ON,
TITLE='Q Osat Total',
REFERENCE=SUM.Q_OSAT_TOTAL,
PROPERTY=MEASURE,
Do you mean a minor release to 53 or the major release of 7?This message has been edited. Last edited by: <Mabel>,
July 15, 2005, 12:04 AM
GCohen
Try this..
TABLE FILE FACT_CUBE SUM Q_OSAT_TOTAL Q_OSAT_COUNT AND COMPUTE XOSAT_PCT=Q_OSAT_COUNT/Q_OSAT_TOTAL; AS 'OSAT %' BY NATION_DISPLAY ...
You can't sum ratios unless you have one value in each row.
(Release 7.1.4 probably)
July 15, 2005, 12:24 PM
<kvn>
Having the COMPUTE in the report does work. I've already done that. It's trying to have the calc in the MAS file is what I'm after. This way multiple reports can reuse that calc without computing it each time.
Should I assume that a calc in a MAS file can not be done this way?
July 15, 2005, 09:06 PM
GCohen
When working with a Cube we don't have the opportunity to perform a Define ourselves on each record. So, the Compute, which is done after retrieval is always the appropriate method. However, if the calculation is known to the cube then it would be in the MFD as .. FIELD=name, PROPERTY=calculated measure, REFERENCE=expression ; (at least in the 7.1.2 release, plus the new COMPUTE data type )