forums

Use these forums to ask questions and discuss Tableau.

Computing a Median as a datapoint calculation

I know I can add medians as a reference line, but is there a way for me to add it as a calculation, just as I would for say an "Average"?

Comments

Tableau leverages the power of your database and sends dynamic SQL or MDX statements directly to the database instead of importing all the data. Alas, most databases do not support the Median as an aggregation which is why it is not in the list. For connections to data in Oracle 10g, Tableau provides support for the Median aggregation.

But if my datasource is an Excel 2007 spreadsheet, this is not do-able, correct?

I'm having the same problem as well and my datasource is from excel as well. Any solution would be greatfully appreciated.

Hey, Dan is right that Excel and other local file data sources such as Access and Text files do not support the RAWSQL functions. You can extract the data by selecting Data > Extract and save it as a .tde files (Tableau Data Extract). While the data extract does not support the Median aggregation, you can pass other SQL queries directly to the database. Only the Oracle 10g connections will support a Median aggregation in the way you are suggesting though.

Erin Easter