US and Worldwide: +1 (866) 660-7555
Results 1 to 2 of 2

Thread: mondrian aggregate the last value

  1. #1
    Join Date
    Aug 2013
    Posts
    1

    Post mondrian aggregate the last value

    hi,
    we have some problems in using mondrian.
    aggregate the last value.


    we have the following dataset:
    Month Payment
    201201 2000
    201202 1500
    ... ...
    201211 1800
    201212 1200
    the according mdx statement:
    select {[Time].[2012].children} on axis(1), {[Measures].[Payment]} on axis(0) from SCHEMA_A


    after Aggregate, we calculate the payment of year 2012,
    we want to get the value 1200, also the value of month 201212, not the sum value 2000+1500+...+1800+1200.
    Year Payment
    2012 1200
    select {[Time].[2012]} on axis(1), {[Measures].[Payment]} on axis(0) from SCHEMA_A


    and, we do not want to use the mdx to calculate it, we use the mdx to get just the result only.
    we just want to use the mondrian schema, such as use the attribute or the CalculatedMember, we think it ourselves like that, but we didn't do it.
    so, how to do that?


    would you please give some advice?
    thanks a lot.

  2. #2
    Join Date
    Jan 2013
    Posts
    353

    Default

    Sorry, I'm not entirely clear what you're asking. If you want to create a calculated member that gets the last payment of 2012, you could use a simple tuple

    ( [Time].[2012].[201212], [Measures].[Payment] )

    or, to get the last member dynamically based on where you're at in the Time hierarchy you could do something like

    (Time.CurrentMember.LastSibling, [Measures].[Payment] )

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •