Median Calculation on Multiple Dimensions

Hello - has any one ever successfully been able to calculate the median off of multiple dimensions?  I have a list of customer spend data at the customer level and would like to calculate the median by certain attributes of those customers. For example, I have 10 customers all who belong to different countries, and different product verticals. I want to know the median for those customers who match US, and Retail, then also calculate the median for UK and Retail or any other combination. The source module has the customer list and time as the dimensions and the source has displays I would like to show mean, median, sd, and variances.