Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: marenkeHi 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