none
Last Child or Last Non Empty

    Question

  • Hi all,
     
            I need to show the last value for the selected date orfor a month for the measure closing stock. i.e if i have transactions for 26th Nov and 30th nov then when i select nov month 30th value should be show. So please let me know which property i need to set. Is it Last child or Last nonempty. Also i would like to know the difference between these two. Also my time dimenios is of type Regular and not of tpe time. Should i change the type of my time dimension??Please let me know.

    Thanks and regards,
    Ram
    Thursday, December 3, 2009 8:33 AM

Answers

All replies

  • Thursday, December 3, 2009 8:48 AM
  • Hi,

    the difference between LastChild and LastNonEmpty is that LastChild will give back always the last member even if it has no data (for example for November the value on 30th Nov). LastNonEmpty will get you the last member that has data in it (for example the data on the 29th Nov).

    The definitions:
    LastChild
     "The member value is evaluated as the value of its last child along the time dimension."
    LastNonEmpty
     "The member value is evaluated as the value of its last child along the time dimension that contains data."
    Defining Semiadditive Behavior
    http://msdn.microsoft.com/en-us/library/ms175356.aspx

    And yes you will need the time dimension because as the definition said it is evaluated along the time dimension.


    Regards,
    Orsi
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, December 3, 2009 9:16 AM
    Answerer
  • Hi All,

      Thanks a lot for the replies. Also i would like to know what is the difference between NONEMPTY and NON EMPTY functions.

    Thanks and regards,
    Ram
    Thursday, December 3, 2009 9:35 AM
  • Hi Ram,

    NonEmpty() function returns the non empty values in a set you specify.
    NON EMPTY is for the axes and will remove the row or comuns that has just empty values.

    NonEmpty (MDX)
    http://msdn.microsoft.com/en-us/library/ms145988.aspx
        "Returns the set of tuples that are not empty from a specified set, based on the cross product of the specified set with a second set."

    Working with Empty Values
    http://msdn.microsoft.com/en-us/library/ms145626.aspx
         "To remove empty rows or columns from a query, you can use the NON EMPTY statement before the axis set definition"


    Regards,
    Orsi
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, December 3, 2009 9:43 AM
    Answerer