1

Topic: Help to make MDX request

From OLAP it is necessary to receive the plane table with fields: date, the order code, the code of the client, the income
Copied from Excel through Olap PvotTable Extension looks so
[spoiler] SELECT NON EMPTY CrossJoin (CrossJoin (Hierarchize ({DrilldownLevel ({DrilldownLevel ({DrilldownLevel ({DrilldownLevel ({
[dimDate]. [Hierarchy - Callendar YQMD]. [All]}, INCLUDE_CALC_MEMBERS)};
[dimDate]. [Hierarchy - Callendar YQMD]. [Attribute - Year], INCLUDE_CALC_MEMBERS)};
[dimDate]. [Hierarchy - Callendar YQMD]. [Attribute - Quarter], INCLUDE_CALC_MEMBERS)};
[dimDate]. [Hierarchy - Callendar YQMD]. [Attribute - Month], INCLUDE_CALC_MEMBERS)}),
Hierarchize ({DrilldownLevel ({[dimOrder]. [Attribute - Order - Order SID]. [All]}, INCLUDE_CALC_MEMBERS)})),
Hierarchize ({DrilldownLevel ({[dimClient]. [Attribute - Client - Client Code Ultima]. [All]}, INCLUDE_CALC_MEMBERS)}))
DIMENSION PROPERTIES PARENT_UNIQUE_NAME, HIERARCHY_UNIQUE_NAME;
[dimOrder]. [Attribute - Order - Order SID]. [Attribute - Order - Order SID]. [Attribute - Order - Order Type];
[dimDate]. [Hierarchy - Callendar YQMD]. [Attribute - Quarter]. [Attribute - Year];
[dimDate]. [Hierarchy - Callendar YQMD]. [Attribute - Month]. [Attribute - Quarter];
[dimDate]. [Hierarchy - Callendar YQMD]. [Attribute - Date]. [Attribute - Day of Month];
[dimDate]. [Hierarchy - Callendar YQMD]. [Attribute - Date]. [Attribute - Day of Week];
[dimDate]. [Hierarchy - Callendar YQMD]. [Attribute - Date]. [Attribute - Day of Year];
[dimDate]. [Hierarchy - Callendar YQMD]. [Attribute - Date]. [Attribute - Is Working Day];
[dimDate]. [Hierarchy - Callendar YQMD]. [Attribute - Date]. [Attribute - Month];
[dimDate]. [Hierarchy - Callendar YQMD]. [Attribute - Date]. [Attribute - Month Name];
[dimDate]. [Hierarchy - Callendar YQMD]. [Attribute - Date]. [Attribute - Month of Year];
[dimDate]. [Hierarchy - Callendar YQMD]. [Attribute - Date]. [Attribute - Month Year];
[dimDate]. [Hierarchy - Callendar YQMD]. [Attribute - Date]. [Attribute - Quarter of Year];
[dimDate]. [Hierarchy - Callendar YQMD]. [Attribute - Date]. [Attribute - Week];
[dimDate]. [Hierarchy - Callendar YQMD]. [Attribute - Date]. [Attribute - Week of Year];
[dimClient]. [Attribute - Client - Client Code Ultima]. [Attribute - Client - Client Code Ultima]. [Attribute - Client - Client Code Ultima Decomposition Level 2] ON COLUMNS
FROM [****] WHERE ([dimDate]. [Attribute - Date] .& [20180730], [Measures]. [CMeasure - Unfactured Sales - Cost Saled])
CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS [/spoiler]
But if such request to launch in MDX  - it hangs up, and by a call through written R the script - simply returns an error
[sub] <checkErrorInfo> 80020009
No support for InterfaceSupportsErrorInfo
checkErrorInfo-2147352567
Error: the Error. [/sub]
Itself tried to write such request
SELECT
[CMeasure - Unfactured Sales - Cost Saled] ON COLUMNS;
{[dimOrder]. [Attribute - Order - Order SID]. [Attribute - Order - Order SID];
[dimClient]. [Attribute - Client - Client Code Ultima]. [Attribute - Client - Client Code Ultima]} ON ROWS
FROM [****]
WHERE [dimDate]. [Attribute - Date]. [Attribute - Date] .& [20180630]
I receive an error: Elements, tuples and dial-ups in function should use identical hierarchies.

2

Re: Help to make MDX request

nexter83;
In studio  a mouse indexes (the correct titles ) also substitute them
.. ON COLUMNS
.. ON Rows

3

Re: Help to make MDX request

nexter83,

SELECT [Measures]. [CMeasure - Unfactured Sales - Cost Saled] on 0;
non empty (
[dimDate]. [Attribute - Date]. [Attribute - Date] .& [20180630];
[dimOrder]. [Attribute - Order - Order SID]. [Attribute - Order - Order SID],
[dimClient]. [Attribute - Client - Client Code Ultima]. [Attribute - Client - Client Code Ultima]
)ON 1
FROM [****]

4

Re: Help to make MDX request

vikkiv;
Works! Many thanks. Some days already I suffer