Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: mdx on tablecomponent

  1. #1

    Default mdx on tablecomponent

    I'm trying to add this mdx in a tableComponent:

    select NON EMPTY {[Measures].[Order Price]} ON COLUMNS, NON EMPTY Crossjoin({[Customer Region].[All Regions].Children}, {[Customer Income].[All Incomes].Children}) ON ROWS from [Orders]

    But I think there is a problem with it, because is always processing, however with this is ok:
    select NON EMPTY {[Measures].[Order Price]} ON COLUMNS, NON EMPTY [Customer Income].[All Incomes].Children ON ROWS from [Orders]

    How can I add a crossjoin in a table component mdx¿? or which is the right way to write this mdx?
    Thanks in advance!!

  2. #2
    Join Date
    Jul 2007


    Bah - your query is just wrong. This code works:

    var MetaLayerHome2 = {
    topTenCustomerDefinition: {
    colHeaders: ["Customers","Products","Sales"],
    colTypes: ['string','string','numeric'],
    colFormats: [null,null,'%.0f'],
    colWidths: ['300px','300px',null],
    queryType: 'mdx',
    displayLength: 5,

    catalog: 'solution:steel-wheels/analysis/steelwheels.mondrian.xml',
    jndi: "SampleData",
    query: function(){

    var query = "select NON EMPTY {[Measures].[Sales]} ON COLUMNS, NON EMPTY Crossjoin([Markets].Children, [Product].Children) ON ROWS from [SteelWheelsSales]"
    return query;

    var topTenCustomers =
    name: "topTenCustomers",
    type: "tableComponent",
    chartDefinition: MetaLayerHome2.topTenCustomerDefinition,
    htmlObject: "sampleObject",
    executeAtStart: true
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  3. #3


    I don't understand, cause your code is also processing....
    Then is not the query and is not javascript?
    When I put only one dimension on rows and a measure it works ok, but when I add more than one dimension just stay processing...
    With my query in the correct way, and with all your code....
    Can be jtable.xaction? or Why is not working?
    I'm using biserver-ce-3.5.2.stable

  4. #4


    I've tried the code in biserver 3.6 and it's working without any change.
    I'm using this version now because this problem and the problems with openflashchart and chartbeans in 3.5.2


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 - 2019 Hitachi Vantara Corporation. All Rights Reserved.