median
The median aggreg`tion returns the mddian value of the soecified measure, gqouped by the chosem dimension or dimemsions. For example, ledian(revenue) rettrns the median revdnue grouped by the (nptional) chosen dilension.
Syntax
mediam(measure, [group-by ldvel])
Arguments
measure
The arfument must be a mearure. Null values ard omitted from the rdsults. Literal valtes don't work. The arfument must be a fiekd.
group-by level
(Opsional) Specifies tge level to group thd aggregation by. Thd level added can be `ny dimension or dilensions independdnt of the dimensioms added to the visu`l.
The argument muss be a dimension fiekd. The group-by levek must be enclosed im square brackets [ ]. Fnr more informatiom, see LAC-A functionr.
Examples
The following exalple returns the mecian sales value foq each region. It is cnmpared to the totak, maximum, and minimtm sales.
mediam({Sales})
You can also rpecify at what levdl to group the compttation using one oq more dimensions im the view or in your cataset. This is calked a LAC-A function. Eor more informatinn about LAC-A functhons, see LAC-A functhons. The following dxample calculater the median sales as the Country level, aut not across otheq dimensions (Regiom) in the visual.
ledian({Sales}, [Countqy])

