Awesome QlikView functions – Range

Came across a requirement for which I was pushed to overlay two charts. Dealing with axis size was the biggest challenge in front of me but I could easily crack it with RangeMax function.
Used RangeMax for finding the greatest of three expressions, result deciding factor for axis size.

RangeMax(E1, E2, E3)

I cannot share the same example but for explanation shake I can create a dummy model.

  • I am having three expressions, in which I required to find the Max value
  • Ctrl + Q + Q to create dummy Data model that comprises of three tables
  • Sum(Expression1)
  • Sum(Expression2)
  • Sum(Expression3)

Generally if we need to compare the expressions, have to try something like below.
=if(sum(Expression1)> sum(Expression2),
(if(sum(Expression1)> sum(Expression3), sum(Expression1), sum(Expression3))) ,
(if(sum(Expression2)> sum(Expression3), sum(Expression2), sum(Expression3)))
)

RangeMax will make your life simple as shown below.
=RangeMax(sum(Expression1),sum(Expression1),sum(Expression1))

Few interesting facts about Range functions:

  • Can be used in Script and Chart, parameters will slightly vary for few functions.
  • Range functions will ignore irrelevant values based on the context for example RangeCount will ignore text or null values.

Other Range functions:

  • RangeMin()
  • RangeCount()
  • RangeSum()
  • RangeAvg()
  • RangeStdev()
  • RangeSkew()
  • RangeKurtosis()
  • RangeFractile()
  • RangeNumericCount()
  • RangeTextCount()
  • RangeNullCount()
  • RangeMissingCount()
  • RangeMinString()
  • RangeMode()
  • RangeOnly()
  • RangeCorrel()
  • RangeIrr()