Last Non Empty



Hello.

My apologies for this post as I've searched through previous posts and
have found posts related to my problem but have been unable to get
exactly what I want.

I'm looking at personnel headcounts over over time dimension.

ie. Dimension Time with 3 levels. Year, Term, Month

I have a calculated member called Headcount, which is as follows:-

Iif([Time].Currentmember.Level.Name = "Year",
([Time].Currentmember.LastChild),
Iif([Time].Currentmember.Level.Name = "Term",
([Time].Currentmember.LastChild),[Measures].[Headcount]))

This displays the Headcount number on a monthly level and when
aggregating to a Term level, takes the figure from the last month.
Similarly, when aggregating to a Year level, the last Term figure is
displayed.

This is all fine and dandy, except when there are non values at a
monthly level i.e. we have not yet come to the end of the Term.

Can anyone help me modify the above MDX for my calculated member, to
display (when at a Term level) the last non-empty month figure ?

By way of an example:

Year Term Month Headcount
2004 11
2 11
Oct 10
Nov 11
Dec 12
Jan 13
Feb 12
Mar 11

2005 11
1 11
Apr 10
May 11
Jun
Jul


In the above example, the 2005 Term 1 total is 11 (i.e may's figure) as
there are not yet figures for June or July.

Any help much appreciated.
Regards,
J.

.



Relevant Pages

  • Re: Followup on movies not playing
    ... After reading relevant posts, I reduced the ... I don't know exactly why changing hardware acceleration resolves so many ... because of the settings you've specified in your Windows display settings. ... PPT usually seems to be in that latter ...
    (microsoft.public.powerpoint)
  • Re: Slightly different forum method
    ... all the posts with the same subject line. ... why force users to accept only one particular screen layout for display ... Cluttering up the screen with avatars and other such nonsense. ... Why the sharp lines for table borders? ...
    (uk.net.web.authoring)
  • Re: Question for MacSoup-ers
    ... > the Graphical Display. ... If you set up a rule to tag all posts, ... you can spacebar through the lot. ... 2nd August 2005: Hell freezes over *again*. ...
    (uk.comp.sys.mac)
  • Re: Hacked email?
    ... portion and shows only their name in the recipient list. ... changed your Mail preferences to make it always display the address? ... Send responses to the relevant news group rather than to me, ... Use a real news client if you want me to see your posts. ...
    (comp.sys.mac.apps)
  • RE: ERROR:"MICROSOFT CANNOT DISPLAY ANSWERS TO QUESTIONS"
    ... SP2 did it to me as well; how can I get SP1 back? ... >a firewall choice is the free zonealarm from zonelabs.com ... >IE6 cannot display ... >>see there are many posts on replys on this. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)