Description: Incorrect result on using median operator in Libreoffice Calc Steps to Reproduce: 1. The median operator in LibreOffice Calc while used with multiple randomly selected items, for example, is =MEDIAN(A74,A65,A55,A46,A38,A30). 2. By mistake, if a user introduces a comma at the end of the list as =MEDIAN(A74,A65,A55,A46,A38,A30,), the function returns the first value in the list i.e. A74 as the result, which is wrong. Unsuspecting user might end up with wrong result. Actual Results: =MEDIAN(A74,A65,A55,A46,A38,A30,) returns A74. Expected Results: =MEDIAN(A74,A65,A55,A46,A38,A30,) can return #VALUE indicating wrong syntax. Reproducible: Always User Profile Reset: No Additional Info: User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0
It's not the first argument that is returned. Appending a comma here passes another "missing" argument that when evaluated is taken as value 0 in the calculation. =MEDIAN(1,2,4,8) => 3 =MEDIAN(1,2,4,8,) => 2 =MEDIAN(1,2,4,8,0) => 2 Excel does the same.
I am honestly sorry to raise the issue without prior understanding. I was looking for mean operator and assumed median does the job. Hence the confusion.