Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: MDX cumulative measure

  1. #1

    Default MDX cumulative measure

    Hi all, maybe someone can help me with this MXD query. I need to make a general cumulative measure like the one in the picture (coloured in yellow). I tried with YTD() but it is not possible because it accumulate only within the year.
    I'll appreciate your help.
    Best regards.

    Name:  tabla_acumulados_pentaho.png
Views: 285
Size:  17.0 KB

  2. #2
    Join Date
    Jan 2013
    Posts
    796

    Default

    Are Ano and Semestre part of a time hierarchy? If so than something like:

    SUM( Semestre.Semestre.members.Item(0) : Semestre.CurrentMember, measures.[Cantidad personas])

    That grabs the first item of the semestres level as the left end of a range going up to the currentmember, adding it all up.

    If they're on distinct hierarchies it gets trickier. Something like:

    SUM(HEAD(Crossjoin(Ano.[Ano].members, [Semestre].[Semestre].members),RANK(([Semestre].CURRENTMEMBER, [Ano].CURRENTMEMBER),Crossjoin(Ano.[Ano].members, [Semestre].[Semestre].members))),[Measures].[Unit Sales])

  3. #3

    Default

    Thanks @mcampbel, it worked perfect with the first formula.

  4. #4

    Default

    Hi,

    I have the same problem but the formulas provided are not working.
    I am using mondrian 4.

    Please help.
    Thanks.

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
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.