Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Show all level properties of a Dimension

  1. #1
    Join Date
    Sep 2008
    Posts
    9

    Default Show all level properties of a Dimension

    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

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

    Code:
    <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
    Code:
    #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

  2. #2
    pstoellberger Guest

    Default

    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

  3. #3
    Join Date
    Sep 2008
    Posts
    9

    Default

    Quote Originally Posted by pstoellberger View Post
    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.

  4. #4
    Join Date
    Aug 2006
    Posts
    141

    Talking Similar request

    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.

  5. #5

    Default

    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....

  6. #6
    Join Date
    Aug 2009
    Posts
    3

    Default

    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:
    Code:
    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

  7. #7
    Join Date
    Nov 2011
    Posts
    2

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2017 Pentaho Corporation. All Rights Reserved.