Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: MDX parameter when blank gets replaced by parameter name (!!) in dynamic MDX query

  1. #1
    Join Date
    Jun 2017

    Default MDX parameter when blank gets replaced by parameter name (!!) in dynamic MDX query


    I have a very frustrating problem.

    I have the below dynamic MDX query.

    with member [Measures].[GM%] as 'IIf(([Measures].[Revenue] > 2), ((([Measures].[Revenue] - [Measures].[Cost]) / [Measures].[Revenue]) * 100), NULL)'

    LastPeriods(5, [Date.YQM].[${paramSelectedFY}].LastChild), [Measures].[GM%] ) ON COLUMNS,

    order ( [SP].Children, [Measures].[Revenue], DESC)
    } ON ROWS
    from [GM_SP]

    where Crossjoin ( { ${paramSelectedSOB} } , { ${paramSelectedIOU} } )

    I can see in the pre-execution function of my table component that I send paramSelectedSOB blank.

    From the catalina log, I can see that pentaho has replaced it with 'paramSelectedSOB' making the query to fail.

    Name:  catalina.jpg
Views: 281
Size:  25.8 KB Name:  dashboard.jpg
Views: 269
Size:  27.0 KB Name:  when emptying parameter.jpg
Views: 283
Size:  27.0 KB

    When setting the parameter through a select box to another MDX path, the page does not work anymore. This happens also with a chart component, but when the query goes in error, the chart shows 'Error Processing'. When selecting again a valid MDX path, the chart works again.

    I have thus 2 problems:

    1) why is Pentaho replacing my variable with the variable name when being blank? the query is build so that it would work with a blank value ... :S

    2) why the Table component fails to react again whereas the chart component still works :S??

  2. #2
    Join Date
    Jun 2017


    I put for now a silly code in the pre-execution so that atleast the component renders...

    But I cant imagine this is the way how it is done? What am I missing?

    if(paramSelectedSOB == ''){

    Dashboards.setParameterValue('paramSelectedSOB', '');


    if(paramSelectedIOU == ''){

    Dashboards.setParameterValue('paramSelectedIOU', '');

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.