I can't think of a direct way to do it.
Let's say your numbers are in Column A, then in B1 you would place the
following formula:
=IF(A1>0,A1,"")
Then drag it down for all numbers in column A. Then you can use
=MEDIAN(B:B) to return the median while excluding zeros