If you are unable to create a new account, please email support@bspsoftware.com

 

Simple question - averaging/median numeric value attached to A or B

Started by nestea, 14 May 2010 10:49:45 AM

Previous topic - Next topic

nestea

Greetings All,

So glad there's a forum for this software...
Got a simple question about syntax. I have:

CASE [Type of Player] WHEN 'Forward' or WHEN 'Defense'
THEN (median ([Points]))
END

I'd like to take an average/median of the points that correspond to either a forward or defense player. I know the above is improper syntax and was looking for the solution...

Thanks in advance.

colt

there are 2 possible solutions:
1.
CASE [Type of Player]
WHEN 'Forward'
THEN (median([Points]))
WHEN 'Defense'
THEN (median([Points]))
END

2.
CASE WHEN [Type of Player]='Forward' OR [Type of Player]='Defense'
THEN (median([Points]))
END

hope this is what you expect.