LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Median

    Employee
    Posted 11-22-2010 12:14

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: marenke

    Hi I'm wondering if there's a median node that have been developped that would return more than 1 value.

    Examble:

    DATATE CYCLETIME
    01-Jan 1
    01-Jan 1
    01-Jan 2
    01-Jan 23
    01-Feb 6
    01-Feb 6
    01-Feb 234

    would return 2 records for Jan (1) and Feb cycle time (6).

    The Code below returns the median point based on a given condition but not sure how to create the record count based on a condition for a full data set, that I could reference to ouput the required value.


    if firstInGroup then medianpoint = 0
    if firstInGroup then rows = 0
    rows = rows + 1
    if lastInGroup then medianpoint = ceil((rows/2))

    emit medianpoint,ORDERCOMPLETEDYYYYMMDD
    where lastInGroup


  • 2.  RE: Median

    Employee
    Posted 11-23-2010 16:58

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: marenke

    Figured it out