Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Retrieve Current Year With Mondrian MDX

  1. #1
    Join Date
    Aug 2008
    Posts
    8

    Default Retrieve Current Year With Mondrian MDX

    Hello somebody,

    pls help
    I have mdx query :
    select {[Measures].[Customer],[Measures].[Target Customer]} ON COLUMNS, NON EMPTY (
    ORDER(CROSSJOIN({[Time].[2008)]},{[Time].[Month].Members}), [Time].[Month].Ordinal,ASC)) ON ROWS FROM [BIAS]

    currently .. at part [Time].[2008] still hardcoded.
    How can I retrieve current year value from server ?

    Thanks in advance

  2. #2
    Join Date
    Sep 2008
    Posts
    25

    Default

    Hi

    the MDX function CurrentDateMember() should do the job.
    You can also experiment with Now()

    Greetings
    Philipp

  3. #3
    Join Date
    Aug 2008
    Posts
    8

    Default

    Quote Originally Posted by iso.smd View Post
    Hi

    the MDX function CurrentDateMember() should do the job.
    You can also experiment with Now()

    Greetings
    Philipp
    Thanks Philip I wil try this

    Regards

  4. #4
    Join Date
    Aug 2008
    Posts
    8

    Default Help need suggenstion

    Hello all pls help

    I want to show number of customer on last year, last month (current year), and current year.
    I've written mdx query as bellow :
    WITH
    MEMBER [Measures].[Customer Last Year] as '([Measures].[Customer], [Time].[2007].[Q2].[5])'
    MEMBER [Measures].[Customer Previous Period] as '([Measures].[Customer], [Time].[2008].[Q2].[4])'
    MEMBER [Measures].[Customer Current Period] as '([Measures].[Customer], [Time].[2008].[Q2].[5])'

    SELECT {[Measures].[Customer Last Year], [Measures].[Customer Previous Period], [Measures].[Customer Current Period]} ON COLUMNS,
    NON EMPTY{[Zone].CurrentMember.Children} ON ROWS
    FROM [BIAS]

    The problem is : when I checked the result. Only true for number of current year customer. the others aren't correct. pls advice....thanks in advance

    Regards,
    Azmi

  5. #5

    Default

    Hi Fauzul,

    You can use PrevMember mdx function. For example, you can see my wiki article at :

    http://pentaho.phi-integration.com/m...n-tiap-periode

    It's in Indonesian though.

    Regards,

    Feris

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.