Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Using "REGION" or "DEPARTMENT" in MDX Queries

  1. #1
    Join Date
    Feb 2008

    Default Using "REGION" or "DEPARTMENT" in MDX Queries

    Hi all
    I want to write a MDX query in my department_variance_data.xaction file,and I want to use the parameter"REGION" in my query,How do I write the query sentence?

    part of my department_variance_data.xaction:

    <REGION type="string">

    <rule-result type="result-set"/>


    <action-type>OLAP Query For Report Data</action-type>
    <catalog type="resource"/>
    <query-results type="result-set" mapping="rule-result"/>
    <query><![CDATA[select NON EMPTY {[Measures].[cost]} ON COLUMNS,
    ([company].[(I want to put the REGION here)].Children) ON ROWS
    from [enesyscube]]]></query>



  2. #2


    Try this:

    <query><![CDATA[select NON EMPTY {[Measures].[cost]} ON COLUMNS,
    ([company].[({REGION})].Children) ON ROWS
    from [enesyscube]]]></query>

    The "{ }" means you want to use a value from a variable.
    The "REGION" inside the "{ }" is the variable "REGION" you've just defined as input in the <inputs> tag.

    Hope this works! Cheers!
    Last edited by roren; 03-19-2008 at 02:52 AM.

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.