MicroStrategy ONE

Histogram Median

Histogram Median is a distributive implementation to calculate approximation of median over large datasets.

Formula

Where:

Lm is the lower limit of the median bar.

n is the total number of observations in the set.

Fm-1 is the total number of observations in all bars below the median bar.

fm is the frequency of the median bar.

c is the median bar width.

Syntax

HistogramMedian([ValueList], NumberOfHistograms)

Where:

ValueList is an attribute, fact, or metric representing a list of values.

NumberOfHistograms represents the histograms to be analyzed.

Example

This example shows a report to find the median Revenue per Customer for each Income Bracket in the Central Region.

HistogramMedian([Max Revenue per Customer], [Max Revenue per Customer]) {~ , Region}