As a tenured connoisseur of all things data analysis, I’ve become quite acquainted with Google Data Studio’s many functions. A key player in our toolset? The
MEDIAN
function. Serving as the heart of various computation operations, the MEDIAN
function helps you uncover the middle-ground value from a set of data.
Utilizing the
MEDIAN
function is all about the syntax—the language and structure of your commands. To call upon this function, you follow a straightforward format: MEDIAN(X)
. X
here symbolizes a numeric field or an expression. Remember, though, this function does not allow an aggregated field or the subsequent result from an aggregation operation to be used as ‘X’.
At its essence, the
MEDIAN
function works primarily to give you the center value from a set of data. If your data set has an odd number of values, it hands you the precise middle value. For an even data set, the MEDIAN
function finds the middle-ground by interpolating between the two center values.
Let’s dabble with our function in a more practical report—Sales metrics. Assume we have the following set of sales data for a week from our e-commerce site:
| Day | Sales ($) | ||| | Mon | 9000 | | Tue | 8500 | | Wed | 9500 | | Thu | 9200 | | Fri | 8800 | | Sat | 9300 | | Sun | 8700 |
To find the median sales value for the week, we input:
MEDIAN(Sales)
. With seven data points (an odd number), the function returns 9200, which is the fourth value when the values are arranged in increasing order.
Now, let’s add in the sales for another day:
| Day | Sales ($) | ||| | Mon | 9000 | | Tue | 8500 | | Wed | 9500 | | Thu | 9200 | | Fri | 8800 | | Sat | 9300 | | Sun | 8700 | | Extra| 9100 |
Here,
MEDIAN(Sales)
will interpolate between the middle values, yielding a median of 9150.
While
MEDIAN
is powerful, it does have its constraints. It’s important to note that this function cannot handle aggregated fields, nor can it process the result of an aggregation function.
Additionally, for datasets with many identical values, the median might not be as indicative of the data’s overall nature as it could be with diverse data values.
Use the
MEDIAN
function when you have outliers in your data that could skew the mean. The median provides a more accurate representation of your typical data point in this case.
When handling an even set of values, consider whether interpolating is the best approach, as different interpretations could yield varying business decisions.
Data analysis and reporting is all about using the right functions, at the right time, to extract the correct information. The
MEDIAN
function in Google Data Studio can be your secret weapon in finding the heart of your data. Remember to respect its limits and make use of every twist and turn to get the most illuminating results!Become a Looker Studio expert
for free
Learn all the secrets of data analysis and create beautiful and effective dashboards thanks to our 30-second video courses! Join Catchr's community on YouTube.
Get more video lessonsAll your data on Looker Studio
Build Looker Studio dashboard easily with your marketing data from all platforms and track your essential KPIs! No-code integration.
Start free trial now!Optimize your data analysis
Get free Looker Studio dashboard template among a large collection of +50 stunning template! Elevate your data visualization.
Get free templates!