Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sivarajs
Specialist II
Specialist II

Rangemax in script

Hi,

I am trying  to use rangemax,Chart level its working but in script its not working

Any idea...

Sivaraj S

14 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi Sivaraj,

Try this sample script.

Years:

LOAD

    RangeMax(Year, Sales) AS MaxValue,

    *;

LOAD * INLINE [

    Year, Sales

    2005, 10000

    2006, 200

    2007,30000

    2008,400

    2009,500

    2010,600

    2011,70000

    2012,800

];

Hope this helps you.

Regards,

jagan.

sivarajs
Specialist II
Specialist II
Author

Its giving all value in the field

jagan
Luminary Alumni
Luminary Alumni

Hi,

RangeMax() receives multiple values as parameters and returns max value among those parameters.

RangeMax(Year, Sales) AS MaxValue

For record 1 in above script, the 2 parameters are 2005, 10000.  Among this two 10000 is the maximum value, so it returns 10000.  Like wise this function works for all the records.

Regards,

Jagan.

sivarajs
Specialist II
Specialist II
Author

What the following example gives result in script

rangemax(1,2,3,4)

can u test this

jagan
Luminary Alumni
Luminary Alumni

Hi Sivaraj,

The result is 4, because 4 is the max value among all values.

Regards,

Jagan.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     It will give you 4?For you its not working like that?

Celambarasan

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this script

Test:

LOAD

rangemax(1,2,3,4)  AS Test

AutoGenerate 1;

Regards,

Jagan.

sivarajs
Specialist II
Specialist II
Author

in sript it gives result like

1

2

3

4

jagan
Luminary Alumni
Luminary Alumni

Hi,

Can you post the script which you used.

Regards,

jagan.