Problem adding members to query model

  • marcogig

    marcogig - 2014-08-04

    Hi all,
    I'm having some problems building this query using the query model:

    SELECT [Time.Anno].[Anno].Members ON ROWS,
    [Measures].[Nr of patients] ON COLUMNS
    FROM Person

    Time is a dimension
    Anno is the name of an hierarchy inside Time
    Anno is also the name of the first level of the previous hierarchy

    I am tring to do something like this:

    QueryDimension dimension = query.getDimension("Time");
    dimension.include(Selection.Operator.MEMBERS, IdentifierNode

    I got the error org.olap4j.OlapException: Unable to find a member with name [[[Time.Anno]].[Anno]]]]

    What's the mistake?

  • Gaurav Joshi

    Gaurav Joshi - 2014-08-06

    I have not tried using query builder but looking at the API, I guess you have to something like

    Hierarchy annoHierarchy = cube.getHierarchies("Anno");
    Level annoLevel = annoHierarchy.getLevels.get("Anno");
    QueryDimension dimension = query.getDimension("Time");



Log in to post a comment.