0
Median value
Greetings, is the median function available for use? I was unable to find it in the manual. Thanks.
2 replies
-
Hi Laura,
To get the median you have to use a formula like this:
let mynumber := ((select 'My table') order by Number).Number;
let mycnt := cnt(mynumber);
let mymedian := if even(mycnt) then
(item(mynumber, mycnt / 2) + item(mynumber, mycnt / 2 + 1)) / 2
else
item(mynumber, mycnt / 2)
end;
mymedianBest, Jörg
-
Sweet! Thanks, Jörg; that’s a huge help.
Content aside
- 6 yrs agoLast active
- 2Replies
- 1632Views