Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate median of expression?


hi,

Can anyone suggest me how to calculate median of below expression in straight table.

Num(MAX( {<Status= {'Open'}>} DateEnter, DateEnter)-(MIN( {<Status= {'Close'}>} DateClose, DateClose)),'#,##0')

Thanks.

2 Replies
marcus_sommer

There isn't a direct median-function available but you could use rangefractile() for this, see: Re: Running Median calculation.

- Marcus

giakoum
Partner - Master II
Partner - Master II

median ([{set_expression}] [ distinct ] [ total [<fld {,fld}>] ] expression )

Returns the aggregated median of expression iterated over the chart dimension(s).

This function has the same limitations for nested aggregation as the avg([{set_expression}] [ distinct ] [ total [<fld { , fld } >]] expression) function. The median function supports Set Analysis and the total qualifier in the same way as the avg([{set_expression}] [ distinct ] [ total [<fld { , fld } >]] expression) function.

Examples:

median( X )    

median( X*Y/3 )    

median( total X )    

median( total <Group> Price )