PDA

View Full Version : Show all level properties of a Dimension



JuanEsteban
12-10-2008, 01:11 PM
I want to show at least one (or All) property of "Nombres" Level from "Nombres Dimension". If I use [Nombres].[Todos los Nombres].Children it only show the "user_id".

I have the following QUERY


WITH MEMBER [Measures].[Mis_Apellidos] AS 'Nombres
.CURRENTMEMBER.PROPERTIES
("Apellido")'
SELECT { [Rendiciones] } ON COLUMNS,
{[Measures].[Mis_Apellidos]} ON ROWS
FROM Evaluaciones4


And the Schema



<Dimension name="Nombres">
<Hierarchy hasAll="true" allMemberName="Todos los nombres" primaryKey="user_id">
<Table name="user"/>
<Level name="Nombres" column="user_id" type="Numeric" uniqueMembers="true">
<Property name="Apellido" column="lastname" />
<Property name="Nombre" column="firstname" />
<Property name="Genero" column="gender"/>
<Property name="Region" column="area"/>
<Property name="Tiempo NavegaciĆ³n" column="sys_total_time"/>
</Level>
</Hierarchy>
</Dimension>

<Cube name="Evaluaciones4">
<Table name="exercises" />
<DimensionUsage name="Nombres" source="Nombres" foreignKey="user_id"/>
<Dimension name="Rendiciones" foreignKey="user_id">
<Hierarchy hasAll="true" allMemberName="Todas las notas" primaryKey="user_id">
<Table name="exercises"/>
<Level name="course_code" column="course_code" type="String" uniqueMembers="true">
<Property name="Titulo" column="title"/>
</Level>
<Level name="Rendiciones" column="title" type="String" uniqueMembers="true"/>
<Level name="Intentos" column="attemp" type="String" uiqueMeberes="false" />
</Hierarchy>
</Dimension>
<Measure name="Resultado" column="score" aggregator="max"/>
</Cube>

And the error

#ERR: mondrian.olap.fun.MondrianEvaluationException: Property 'Apellido' is not valid for member '[Nombres].[Todos los nombres]'
On Mondrian OLAP Cube

What I am doing wrong? How I show Apellido, Nombre, Genero, etc properties from the query or the schema and not form the control of the JPivot controls?

Thanks for reading

pstoellberger
12-10-2008, 01:54 PM
I don't know exactly what you're trying to do but what about:

SELECT { [Rendiciones],[Nombres].[Todos los Nombres] } ON COLUMNS,
{[Measures].[Mis_Apellidos]} ON ROWS
FROM Evaluaciones4

or

SELECT { [Rendiciones],[Nombres].[Todos los Nombres].[Apellido] } ON COLUMNS,
{[Measures].[Mis_Apellidos]} ON ROWS
FROM Evaluaciones4

JuanEsteban
12-10-2008, 02:46 PM
I don't know exactly what you're trying to do but what about:

SELECT { [Rendiciones],[Nombres].[Todos los Nombres] } ON COLUMNS,
{[Measures].[Mis_Apellidos]} ON ROWS
FROM Evaluaciones4

or

SELECT { [Rendiciones],[Nombres].[Todos los Nombres].[Apellido] } ON COLUMNS,
{[Measures].[Mis_Apellidos]} ON ROWS
FROM Evaluaciones4


Thanks. I already try this and is not what I need..

What I need is to see all the Dimension properities of the level Nombres in the Nombres Dimension of the schema by default in one view.

karlose
02-17-2009, 02:46 PM
Hi, I'm Carlos Ernesto, and i've working long time with pentaho over ubuntu. No i'm traying to do some similar to did by you. For now, i can say that it is a usual error because under a group of members it's impossible that we can operare with properties. The properties only can be at lower level of granularity.

Over my example, i've selected two levels, one the summary and other the detail. Over detail, the properties are shown well, but how i can expect under summary view appear the error #ERR: mondrian.olap.fun.MondrianEvaluationException.

Now i want to know how can control this situation.:D

Alex Aldrete
05-21-2009, 12:10 PM
Hi, im Alex Aldrete, From Mexico, and im triying some similar to your case, but, i cant, if someone can help us, please, ill apreciate....

juand
01-12-2010, 11:22 PM
What is happening is that the [Todos los nombres] member is actually an aggregate, so it does not have a single member from which to pick the property.

More to the point, it is the [Nombres] level that has the property 'Appellido', the (All) virtual member does not. One way to solve this is to include an IIF in your MDX to differentiate when you are visiting a member of the [Nombres] level, like so:


WITH MEMBER [Measures].[Mis_Apellidos]
AS 'IIF(Nombres.CURRENTMEMBER.Level = "Nombres", Nombres.CURRENTMEMBER.PROPERTIES("Apellido"), "")'
SELECT { [Rendiciones] } ON COLUMNS,
{[Measures].[Mis_Apellidos]} ON ROWS
FROM Evaluaciones4

mkober
02-03-2012, 07:38 AM
Hi i'm a BI Developer and i have a similar issue:


I have a problem with a property of a dimension, i want to show a sum of it on all levels of my dimension(there are 3 levels), but i only can make this appear on the lower level.


The current structure of the dimension levels is Year > Month > Day, the property can be viewed in the day level, on the ancestral levels i want to see the sum of the property, at months the sum of all days and at year the sum of all months.

Thanks