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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CrossTab Median Function

Status
Not open for further replies.

FinalPrime

Technical User
Jul 28, 2003
50
US
I need the Median in a crosstab function. From the choices I see only Avg, count , First,etc. functions from the CrossTab Wizard.

Seems simple enough, I would us my own median functions. The problem is, I can't figure out how to do it.

Any guidence?

thanks in advance.
Finalprime
 
Have you tried your own median function? What is your median function?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
A simple Access crosstab function example
using Wizard:
SELECT tblSalesData.Code,
Avg(tblSalesData.SalePrice) AS AvgOfSalePrice
FROM tblSalesData
GROUP BY tblSalesData.Code;

Using my MedianFunction and VB

SELECT tblSalesData.Code,
ReturnMedian("tblSalesData","SalePrice")
AS MedianSalePrice
FROM tblSalesData
GROUP BY tblSalesData.Code;

VB works. So simple.
thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top