PDA

View Full Version : [Mondrian] Default measure not configurable in Schema.xml.



Shishir Das
04-12-2007, 08:50 AM
Hi,

We need a functionality by which we can specify a calculated member as a
default measure.
Currently, Mondrian considers the first measure defined in a cube as the
default measure, hence a calculated member cannot be default measure.


Is there an existing way(which we overlooked) to achieve this? Please let
us know.

We could think of a solution where:

we have a property added to the cube element in Schema.xml to specify the
default measure so that all queries use that measure
as default measure. It will be an optional property. If user does not
explicity specify it, the behaviour will be the same as it is now. Do you
foresee any issues if we add this property?


Regards,
Shishir
_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian

Haridasan T
04-12-2007, 01:00 PM
mondrian.rolap.CachePool.flush()
will this work for Mondrian 2.2 ?




On 4/12/07, Shishir Das <sdas (AT) thoughtworks (DOT) com> wrote:
>
>
> Hi,
>
> We need a functionality by which we can specify a calculated member as a
> default measure.
> Currently, Mondrian considers the first measure defined in a cube as the
> default measure, hence a calculated member cannot be default measure.
>
>
> Is there an existing way(which we overlooked) to achieve this? Please let
> us know.
>
> We could think of a solution where:
>
> we have a property added to the cube element in Schema.xml to specify the
> default measure so that all queries use that measure
> as default measure. It will be an optional property. If user does not
> explicity specify it, the behaviour will be the same as it is now. Do you
> foresee any issues if we add this property?
>
>
> Regards,
> Shishir
> _______________________________________________
> Mondrian mailing list
> Mondrian (AT) pentaho (DOT) org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
>


--
http://cfo-portal.blogspot.com/

_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian

Matt Campbell
04-12-2007, 04:01 PM
Something like this is supported in AS2K. There is a cube level property to
set the default measure, and it can be either base or calculated.



On 4/12/07, Shishir Das <sdas (AT) thoughtworks (DOT) com> wrote:
>
>
> Hi,
>
> We need a functionality by which we can specify a calculated member as a
> default measure.
> Currently, Mondrian considers the first measure defined in a cube as the
> default measure, hence a calculated member cannot be default measure.
>
>
> Is there an existing way(which we overlooked) to achieve this? Please let
> us know.
>
> We could think of a solution where:
>
> we have a property added to the cube element in Schema.xml to specify the
> default measure so that all queries use that measure
> as default measure. It will be an optional property. If user does not
> explicity specify it, the behaviour will be the same as it is now. Do you
> foresee any issues if we add this property?
>
>
> Regards,
> Shishir
> _______________________________________________
> Mondrian mailing list
> Mondrian (AT) pentaho (DOT) org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
>

_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian

Julian Hyde
04-12-2007, 05:50 PM
Having a calculated member as default member is a great idea.

There is a problem that when you evaluate a calculated member, the
context is switched so that the current member becomes the default for
that dimension.

For example,

WITH MEMBER [Measures].[Foo] as ' [Measures].CurrentMember.Name '
SELECT {[Measures].[Foo] } ON COLUMNS
FROM [Sales]

will return "Unit Sales".

If you define a calculated member as the default member, and you forget
to switch the context, the expression will loop. For example, if you
define

[Measures].[Foo] as ' ([Time].[1997].[Q2], [Store].[CA] ) '

and make [Foo] the default measure, it is saying that [Foo] for any cell
is the value of [Foo] in California, 97Q2, which is a recursive defn.

It is not a terrible problem, but it is a pitfall end-users should know
about, and you should document in schema.html. You should test for it
and make sure that the error message is reasonable.

Julian



_____

From: mondrian-bounces (AT) pentaho (DOT) org [mailto:mondrian-bounces (AT) pentaho (DOT) org]
On Behalf Of Shishir Das
Sent: Thursday, April 12, 2007 5:28 AM
To: mondrian (AT) pentaho (DOT) org
Subject: [Mondrian] Default measure not configurable in Schema.xml.



Hi,

We need a functionality by which we can specify a calculated member as a
default measure.
Currently, Mondrian considers the first measure defined in a cube as the
default measure, hence a calculated member cannot be default measure.


Is there an existing way(which we overlooked) to achieve this? Please
let us know.

We could think of a solution where:

we have a property added to the cube element in Schema.xml to specify
the default measure so that all queries use that measure
as default measure. It will be an optional property. If user does not
explicity specify it, the behaviour will be the same as it is now. Do
you foresee any issues if we add this property?


Regards,
Shishir


_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian

Haridasan T
04-14-2007, 01:51 PM
Not able to flush Cache.



Giving error
javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to
compile class for JSP An error occurred at line: 10 in the jsp file:
/WEB-INF/queries/ar.jsp Generated servlet error:
mondrian.rolap.CachePoolcannot be resolved to a type

javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable
to compile class for JSP

An error occurred at line: 10 in the jsp file: /WEB-INF/queries/ar.jsp
Generated servlet error:mondrian.rolap.CachePool cannot be resolved to a type

---

se code below

---

<%@ page import="mondrian.olap.*;" %>

<%@ page session="true" contentType="text/html; charset=ISO-8859-1" %>

<%@ taglib uri="http://www.tonbeller.com/jpivot" prefix="jp" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>







<%

mondrian.rolap.CachePool.flush();

%>



<jp:mondrianQuery id="query01" jdbcDriver="oracle.jdbc.driver.OracleDriver"
jdbcUrl="jdbc:oracle:thin:@localhost:1521:XE " jdbcUser="ABCD"
jdbcPassword="ABCD"

catalogUri="/WEB-INF/queries/ar.xml">





select {
[Measures].[Outstanding],[Measures].[Days_60],[Measures].[Days_90],[Measures].[Days_120],[Measures].[Over_120]}
on columns,NON EMPTY

{([Country].[All country],[Location].[All location],[Area].[All
area],[Customer].[All customer])} on rows

from ar

</jp:mondrianQuery>

<c:set var="title01" scope="session">TEST-2s </c:set>






On 4/13/07, Julian Hyde <julianhyde (AT) speakeasy (DOT) net> wrote:
>
> Having a calculated member as default member is a great idea.
>
> There is a problem that when you evaluate a calculated member, the context
> is switched so that the current member becomes the default for that
> dimension.
>
> For example,
>
> WITH MEMBER [Measures].[Foo] as ' [Measures].CurrentMember.Name '
> SELECT {[Measures].[Foo] } ON COLUMNS
> FROM [Sales]
>
> will return "Unit Sales".
>
> If you define a calculated member as the default member, and you forget to
> switch the context, the expression will loop. For example, if you define
>
> [Measures].[Foo] as ' ([Time].[1997].[Q2], [Store].[CA] ) '
>
> and make [Foo] the default measure, it is saying that [Foo] for any cell
> is the value of [Foo] in California, 97Q2, which is a recursive defn.
>
> It is not a terrible problem, but it is a pitfall end-users should know
> about, and you should document in schema.html. You should test for it and
> make sure that the error message is reasonable.
>
> Julian
>
> ------------------------------
> *From:* mondrian-bounces (AT) pentaho (DOT) org [mailto:mondrian-bounces (AT) pentaho (DOT) org]
> *On Behalf Of *Shishir Das
> *Sent:* Thursday, April 12, 2007 5:28 AM
> *To:* mondrian (AT) pentaho (DOT) org
> *Subject:* [Mondrian] Default measure not configurable in Schema.xml.
>
>
>
> Hi,
>
> We need a functionality by which we can specify a calculated member as a
> default measure.
> Currently, Mondrian considers the first measure defined in a cube as the
> default measure, hence a calculated member cannot be default measure.
>
>
> Is there an existing way(which we overlooked) to achieve this? Please let
> us know.
>
> We could think of a solution where:
>
> we have a property added to the cube element in Schema.xml to specify the
> default measure so that all queries use that measure
> as default measure. It will be an optional property. If user does not
> explicity specify it, the behaviour will be the same as it is now. Do you
> foresee any issues if we add this property?
>
>
> Regards,
> Shishir
>
>
> _______________________________________________
> Mondrian mailing list
> Mondrian (AT) pentaho (DOT) org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
>


--
http://cfo-portal.blogspot.com/

_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian