<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">I thought the lesson was don’t ever use more than 3 axes
</span><span style="font-size:11.0pt;font-family:Wingdings;color:#1F497D">J</span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> mondrian-bounces@pentaho.org [mailto:mondrian-bounces@pentaho.org]
<b>On Behalf Of </b>Roland Bouman<br>
<b>Sent:</b> Monday, March 28, 2016 9:25 AM<br>
<b>To:</b> Mondrian developer mailing list &lt;mondrian@pentaho.org&gt;<br>
<b>Subject:</b> Re: [Mondrian] Mondrian vs Olap4j vs Ole DB for OLAP Named Axes definitions<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">Wait - I stand corrected. I only get this when using the named axis. ON Axis(x) or simply ON x work as expected.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">I guess that from my pov, that solves it.&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">(And I guess the lesson I leaned is to never, ever use axis names, at least not if you want your MDX to be portable across engines.)<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">On Mon, Mar 28, 2016 at 12:14 PM, Roland Bouman &lt;<a href="mailto:roland.bouman@gmail.com" target="_blank">roland.bouman@gmail.com</a>&gt; wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Perhaps this is known behavior - if so, pardon my ignorance. I did look but did not find any description of this issue I just ran into.&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Consider this query:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">SELECT [Measures].Members on COLUMNS, [Gender].Members on ROWS, [Marital Status].Members on PAGES, [Education Level].Members on SECTIONS, [Product].[Product Family].Members on CHAPTERS
 FROM [Sales]</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">I execute this over XML/A and I get a result. But not all is well. Consider this fragment of the AxisInfo:</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &lt;AxesInfo&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">...<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;AxisInfo name=&quot;Axis3&quot;&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;HierarchyInfo name=&quot;Product&quot;&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;UName name=&quot;[Product].[MEMBER_UNIQUE_NAME]&quot;/&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;Caption name=&quot;[Product].[MEMBER_CAPTION]&quot;/&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;LName name=&quot;[Product].[LEVEL_UNIQUE_NAME]&quot;/&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;LNum name=&quot;[Product].[LEVEL_NUMBER]&quot;/&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;DisplayInfo name=&quot;[Product].[DISPLAY_INFO]&quot;/&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/HierarchyInfo&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/AxisInfo&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;AxisInfo name=&quot;Axis4&quot;&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;HierarchyInfo name=&quot;Education Level&quot;&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;UName name=&quot;[Education Level].[MEMBER_UNIQUE_NAME]&quot;/&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;Caption name=&quot;[Education Level].[MEMBER_CAPTION]&quot;/&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;LName name=&quot;[Education Level].[LEVEL_UNIQUE_NAME]&quot;/&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;LNum name=&quot;[Education Level].[LEVEL_NUMBER]&quot;/&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;DisplayInfo name=&quot;[Education Level].[DISPLAY_INFO]&quot;/&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/HierarchyInfo&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/AxisInfo&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;AxisInfo name=&quot;SlicerAxis&quot;/&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/AxesInfo&gt;<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">The problem is that the order of the last two query axes is reversed in the result. I get a similar result when I use integer axis designations or Axis(x) designations.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">I also took a look at the docs. First of all, this:</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><a href="https://msdn.microsoft.com/en-us/library/ms146052.aspx" target="_blank">https://msdn.microsoft.com/en-us/library/ms146052.aspx</a></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">which lists the named axes in this order:</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<pre style="line-height:13.15pt;word-wrap:normal;overflow:auto"><span style="font-family:Consolas;color:black">COLUMNS | ROWS | PAGES | SECTIONS | CHAPTERS<o:p></o:p></span></pre>
<pre style="line-height:13.15pt;word-wrap:normal;overflow:auto"><span style="font-family:Consolas;color:black">and this<o:p></o:p></span></pre>
<pre style="word-wrap:normal;overflow:auto"><span style="font-family:Consolas;color:black"><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms713616(v=vs.85).aspx" target="_blank">https://msdn.microsoft.com/en-us/library/windows/desktop/ms713616(v=vs.85).aspx</a></span><o:p></o:p></pre>
<pre style="word-wrap:normal;overflow:auto"><o:p>&nbsp;</o:p></pre>
<pre style="word-wrap:normal;overflow:auto"><span style="font-family:Consolas;color:black">which reads: The first five axes — COLUMNS, ROWS, PAGES, SECTIONS, and CHAPTERS — can be used in place of AXIS(0), AXIS(1), AXIS(2), AXIS(3), and AXIS(4), respectively.</span><o:p></o:p></pre>
<pre style="word-wrap:normal;overflow:auto"><o:p>&nbsp;</o:p></pre>
<pre style="word-wrap:normal;overflow:auto"><span style="font-family:Consolas;color:black">When I compare this to both the olap4j and the mondrian documentation:</span><o:p></o:p></pre>
<pre style="word-wrap:normal;overflow:auto"><o:p>&nbsp;</o:p></pre>
<pre style="word-wrap:normal;overflow:auto"><span style="font-family:Consolas;color:black"><a href="http://www.olap4j.org/api/org/olap4j/Axis.Standard.html" target="_blank">http://www.olap4j.org/api/org/olap4j/Axis.Standard.html</a></span><o:p></o:p></pre>
<pre style="word-wrap:normal;overflow:auto"><span style="font-family:Consolas;color:black"><a href="http://www.olap4j.org/2.0/api/org/olap4j/Axis.Standard.html" target="_blank">http://www.olap4j.org/2.0/api/org/olap4j/Axis.Standard.html</a></span><o:p></o:p></pre>
<pre style="word-wrap:normal;overflow:auto"><span style="font-family:Consolas;color:black"><a href="http://mondrian.pentaho.com/api/mondrian/olap/AxisOrdinal.StandardAxisOrdinal.html" target="_blank">http://mondrian.pentaho.com/api/mondrian/olap/AxisOrdinal.StandardAxisOrdinal.html</a></span><o:p></o:p></pre>
<pre style="word-wrap:normal;overflow:auto"><o:p>&nbsp;</o:p></pre>
<pre style="word-wrap:normal;overflow:auto"><span style="font-family:Consolas;color:black">These all list CHAPTERS as Axis(3) and SECTIONS as Axis(4); that is, chapters and sections are reversed as compared to the order listed in the ole db standard.</span><o:p></o:p></pre>
<pre style="word-wrap:normal;overflow:auto"><o:p>&nbsp;</o:p></pre>
<pre style="word-wrap:normal;overflow:auto"><span style="font-family:Consolas;color:black">Finally, Oracle Essbase (<a href="https://docs.oracle.com/cd/E12825_01/epm.111/esb_techref/frameset.htm?mdx_axis.htm" target="_blank">https://docs.oracle.com/cd/E12825_01/epm.111/esb_techref/frameset.htm?mdx_axis.htm</a>) also seems to reverse CHAPTERS and SECTIONS with respect to the Ole DB Standard.</span><o:p></o:p></pre>
<pre style="word-wrap:normal;overflow:auto"><o:p>&nbsp;</o:p></pre>
<pre style="word-wrap:normal;overflow:auto">I just wanted to check my assumptions with the list before proceeding to file bugs:<o:p></o:p></pre>
<pre style="word-wrap:normal;overflow:auto"><o:p>&nbsp;</o:p></pre>
<pre style="word-wrap:normal;overflow:auto">1) in my opinion the reversal of the axes in the result like I witnessed in my query example is an issue that is separate from the difference&nbsp;<span style="font-family:&quot;Arial&quot;,sans-serif">w/re to olad4j vs oledb to naming convention </span><o:p></o:p></pre>
<pre style="word-wrap:normal;overflow:auto"><span style="font-family:&quot;Arial&quot;,sans-serif">2) While I would like it better if there was no difference between mondrian/olap4j vs oledb for olap, I suppose the convention for mapping axis names to index is not that important. But if a choice is made to use a designation different from the one in Ole DB, then the olap4j / mondrian documentation should probably make a point of explicitly documenting the difference so as to prevent confusion.</span><o:p></o:p></pre>
<pre style="word-wrap:normal;overflow:auto"><o:p>&nbsp;</o:p></pre>
<pre style="line-height:13.15pt;word-wrap:normal;overflow:auto"><span style="font-family:Consolas;color:black">Finally, does someone have a suggestion for working around or avoiding the wrong result I got out of my query? <o:p></o:p></span></pre>
<pre style="line-height:13.15pt;word-wrap:normal;overflow:auto"><span style="font-family:Consolas;color:black"><o:p>&nbsp;</o:p></span></pre>
<pre style="line-height:13.15pt;word-wrap:normal;overflow:auto"><span style="font-family:Consolas;color:black">best regards,<o:p></o:p></span></pre>
<pre style="line-height:13.15pt;word-wrap:normal;overflow:auto"><span style="font-family:Consolas;color:black"><o:p>&nbsp;</o:p></span></pre>
<pre style="line-height:13.15pt;word-wrap:normal;overflow:auto"><span style="font-family:Consolas;color:black">Roland<o:p></o:p></span></pre>
<pre style="line-height:13.15pt;word-wrap:normal;overflow:auto"><span style="font-family:Consolas;color:black"><o:p>&nbsp;</o:p></span></pre>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas;color:#888888"><br clear="all">
</span><span style="color:#888888"><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="color:#888888"><o:p>&nbsp;</o:p></span></p>
</div>
<p class="MsoNormal"><span style="color:#888888">-- <o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="color:#888888">Roland Bouman<br>
blog: <a href="http://rpbouman.blogspot.com/" target="_blank">http://rpbouman.blogspot.com/</a><br>
twitter: @rolandbouman<br>
linkedin: <a href="http://www.linkedin.com/profile/view?id=5142800&amp;trk=tab_pro" target="_blank">
http://www.linkedin.com/profile/view?id=5142800&amp;trk=tab_pro</a><br>
<br>
Author of &quot;Pentaho Solutions&quot; (Wiley, ISBN: 978-0-470-48432-6 <a href="http://tinyurl.com/lvxa88" target="_blank">
http://tinyurl.com/lvxa88</a>) and &quot;Pentaho Kettle Solutions&quot; (Wiley, ISBN: 978-0-470-63517-9
<a href="http://tinyurl.com/33r7a8m" target="_blank">http://tinyurl.com/33r7a8m</a>)<o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<p class="MsoNormal">Roland Bouman<br>
blog: <a href="http://rpbouman.blogspot.com/" target="_blank">http://rpbouman.blogspot.com/</a><br>
twitter: @rolandbouman<br>
linkedin: <a href="http://www.linkedin.com/profile/view?id=5142800&amp;trk=tab_pro" target="_blank">
http://www.linkedin.com/profile/view?id=5142800&amp;trk=tab_pro</a><br>
<br>
Author of &quot;Pentaho Solutions&quot; (Wiley, ISBN: 978-0-470-48432-6 <a href="http://tinyurl.com/lvxa88" target="_blank">
http://tinyurl.com/lvxa88</a>) and &quot;Pentaho Kettle Solutions&quot; (Wiley, ISBN: 978-0-470-63517-9
<a href="http://tinyurl.com/33r7a8m" target="_blank">http://tinyurl.com/33r7a8m</a>)<o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>