Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

How does the median function work

Hello everyone!

I am just all sorts of confused on the median function. I just want to display the median of three numbers as a boundary on my gauge chart. I thought it would be like rangemedian(#,##,###) like the rangemax and rangemin functions, However, upon further research it's supposed to look like this (maybe?):

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

I just need to know how to set is up so I get the median of sum(x), sum(y), and sum(z).Thanks for all your help!

1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Following Aaron's suggestion:

RangeFractile(0.5, sum(x), sum(y), sum(z))

-Rob

View solution in original post

4 Replies
Highlighted
Specialist
Specialist

Hello!

I believe the expression you want to use is RangeFractile - you can use it along with a fractile value of 0.5 and your three expressions. See the help entry below:

rangefractile (0.5, above(sum(x),-1,3))returns the median of the three results of the sum(x) function evaluated on the row below the current row, the current row and the row above the current row.
Highlighted
Not applicable

I'm sorry; I'm still confused. Can you write out the whole thing with the three sums? This makes even less sense to me. Thanks for your help!

Highlighted
Not applicable

I don't mean a function sum(x). I mean sum of some field name like sum(Quantity). That was probably confusing. Sorry!

Highlighted
MVP & Luminary
MVP & Luminary

Following Aaron's suggestion:

RangeFractile(0.5, sum(x), sum(y), sum(z))

-Rob

View solution in original post