Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to calculate Median in report Studio

Status
Not open for further replies.

rvasudev

Programmer
May 25, 2005
6
0
0
US
Hi all,

In the aggregate function list, we have 'Median'(along with Total, Min.MAx.etc...) as one of the options. But when I use this it does not work. No effect is seen. Even the query generated does not involve any function which would calculate the median.

But in Oracle we can acheive the median value using the following query...

SELECT A.DEPT,A.SALARY, percentile_disc (0.5)
within GROUP (ORDER BY A.SALARY) AS "Median"
FROM Test_Table BY A.DEPT,A.SALARY

Can we bring out the funtionality of this query in Report Studio. Can we some how bring the 'WITHIN' clause as part of the query generated by Report Studio?

Is there a way other than using Tabular SQL?

Thanks in advance for any pointers...

Ramesh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top